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

Update user metadata

Copy link

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