diff options
Diffstat (limited to 'protocols/Discord/src/dispatch.cpp')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 0dc544eab1..becbab63f9 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -44,6 +44,7 @@ static handlers[] = // these structures must me sorted alphabetically { L"TYPING_START", &CDiscordProto::OnCommandTyping }, + { L"USER_SETTINGS_UPDATE", &CDiscordProto::OnCommandUserSettingsUpdate }, { L"USER_UPDATE", &CDiscordProto::OnCommandUserUpdate }, }; @@ -425,3 +426,12 @@ void CDiscordProto::OnCommandUserUpdate(const JSONNode &pRoot) RetrieveAvatar(hContact); } } + +void CDiscordProto::OnCommandUserSettingsUpdate(const JSONNode &pRoot) +{ + int iStatus = StrToStatus(pRoot["status"].as_mstring()); + if (iStatus != 0) { + int iOldStatus = m_iStatus; m_iStatus = iStatus; + ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); + } +} |