diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-29 22:42:49 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-29 22:42:49 +0300 |
commit | 22499af34db1cd91cc8b0b118890863334a86cb2 (patch) | |
tree | a5519e0f3964c5bc75de213e4ade9f7c6f69ee97 | |
parent | 501233c3c01ed78227b500d2363ed48ce567031c (diff) |
correct notification about own avatar change
-rw-r--r-- | protocols/Icq10/src/server.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/Icq10/src/server.cpp b/protocols/Icq10/src/server.cpp index 1889f56a94..97e5703268 100644 --- a/protocols/Icq10/src/server.cpp +++ b/protocols/Icq10/src/server.cpp @@ -387,8 +387,11 @@ void CIcqProto::OnReceiveAvatar(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pRe fwrite(pReply->pData, pReply->dataLength, 1, out); fclose(out); - ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&ai), 0); - debugLogW(L"Broadcast new avatar: %s", ai.filename); + if (hContact != 0) { + ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, HANDLE(&ai), 0); + debugLogW(L"Broadcast new avatar: %s", ai.filename); + } + else CallService(MS_AV_REPORTMYAVATARCHANGED, (WPARAM)m_szModuleName, 0); } else ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, HANDLE(&ai), 0); } |