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

Update user metadata

Updating a user metadata works the same way as creating a user metadata. Values of existing keys will be updated and values of new keys will be added.

SBDUser* currentUser = SBDMain::GetCurrentUser();

std::map<std::wstring, std::wstring> metaData;
metaData[L"key1"] = L"valueToUpdate1";
metaData[L"key2"] = L"valueToUpdate2";

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