summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r--protocols/Telegram/src/server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 9136b4c11d..8f27bcab27 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -1037,7 +1037,8 @@ void CTelegramProto::ProcessUser(TD::updateUser *pObj)
if (auto *pSmall = pPhoto->small_.get()) {
auto remoteId = pSmall->remote_->unique_id_;
auto storedId = getMStringA(pu->hContact, DBKEY_AVATAR_HASH);
- if (remoteId != storedId.c_str()) {
+ auto wszFileName = GetAvatarFilename(pu->hContact);
+ if (remoteId != storedId.c_str() || _waccess(wszFileName, 0)) {
if (!remoteId.empty()) {
pu->szAvatarHash = remoteId.c_str();
setString(pu->hContact, DBKEY_AVATAR_HASH, remoteId.c_str());