diff options
author | George Hazan <ghazan@miranda.im> | 2017-02-01 20:11:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-02-01 20:11:44 +0300 |
commit | d2d633a1667ea16c9c88eae9d679c91c545a77ee (patch) | |
tree | 54b712a6ce2ebfdf30a83e7705814b69fd498428 /protocols | |
parent | a85c40a54d9036c98aed37071500df5926e74028 (diff) |
fix for null avatar hash processing
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/utils.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index a9b95b6f49..daddcc46ff 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -197,7 +197,10 @@ CDiscordUser* CDiscordProto::PrepareUser(const JSONNode &user) pUser->hContact = hContact; } - setWString(pUser->hContact, DB_KEY_AVHASH, avatar); + if (avatar.IsEmpty()) + delSetting(pUser->hContact, DB_KEY_AVHASH); + else + setWString(pUser->hContact, DB_KEY_AVHASH, avatar); return pUser; } |