diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-02 16:36:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-02 16:36:43 +0300 |
commit | e1d7991a9095a848f0be2dd4a2677697b2e500da (patch) | |
tree | ddecdab8142634c6e2147adf0d8d9da203db7384 /protocols/Discord/src/utils.cpp | |
parent | fa650aaf5029cc11edf1540996e596a88acabbc1 (diff) |
Discord: avatar change detector moved to the separate function
Diffstat (limited to 'protocols/Discord/src/utils.cpp')
-rw-r--r-- | protocols/Discord/src/utils.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index 5b496b74c4..de86bef956 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -172,7 +172,6 @@ CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) return g_myUser; int iDiscriminator = _wtoi(user["discriminator"].as_mstring()); - CMStringW avatar = user["avatar"].as_mstring(); CMStringW username = user["username"].as_mstring(); CDiscordUser *pUser = FindUser(id); @@ -210,10 +209,7 @@ CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) pUser->hContact = hContact; } - if (avatar.IsEmpty()) - delSetting(pUser->hContact, DB_KEY_AVHASH); - else - setWString(pUser->hContact, DB_KEY_AVHASH, avatar); + CheckAvatarChange(pUser->hContact, user["avatar"].as_mstring()); return pUser; } |