summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-01 20:11:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-01 20:11:44 +0300
commitd2d633a1667ea16c9c88eae9d679c91c545a77ee (patch)
tree54b712a6ce2ebfdf30a83e7705814b69fd498428 /protocols/Discord/src
parenta85c40a54d9036c98aed37071500df5926e74028 (diff)
fix for null avatar hash processing
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/utils.cpp5
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;
}