/ SDKs / Unreal
SDKs
Chat SDKs Unreal v3
Chat SDKs Unreal
Chat SDKs
Unreal
Version 3

Update channel metadata

Copy link

Updating a channel metadata is the same as creating a channel metadata. Values of existing keys will be updated and values of new keys will be added.

std::map<std::wstring, std::wstring> metaData;
metaData[L"key1"] = L"valueToUpdate1";  // Update an existing item with a new value.
metaData[L"key2"] = L"valueToUpdate2";  // Update an existing item with a new value.
metaData[L"key3"] = L"valueToAdd3";     // Add a new key-value item.

channel->UpdateMetaData(metaData, [](const std::map<std::wstring, std::wstring>& meta_data, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});