summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord')
-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;
}