Chat / Unreal
Current version: v3
Chat Unreal v3
Chat Unreal
Chat
Unreal
Home
/
Chat
/
Unreal
/
Channels

Update channel metadata

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;
    }
});