summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/FacebookRM/avatars.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/FacebookRM/avatars.cpp b/protocols/FacebookRM/avatars.cpp
index 0ebfa7a558..2239843ef6 100644
--- a/protocols/FacebookRM/avatars.cpp
+++ b/protocols/FacebookRM/avatars.cpp
@@ -71,7 +71,7 @@ void FacebookProto::CheckAvatarChange(HANDLE hContact, std::string image_url)
DBVARIANT dbv;
bool update_required = true;
- if (!DBGetContactSettingTString(hContact, m_szModuleName, FACEBOOK_KEY_AV_URL, &dbv))
+ if (!DBGetContactSettingString(hContact, m_szModuleName, FACEBOOK_KEY_AV_URL, &dbv))
{
update_required = image_url != dbv.pszVal;
DBFreeVariant(&dbv);
@@ -80,7 +80,10 @@ void FacebookProto::CheckAvatarChange(HANDLE hContact, std::string image_url)
{
DBWriteContactSettingString(hContact, m_szModuleName, FACEBOOK_KEY_AV_URL, image_url.c_str());
if (hContact)
+ {
+ DBWriteContactSettingByte(hContact, "ContactPhoto", "NeedUpdate", 1);
ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ }
else
{
PROTO_AVATAR_INFORMATIONT ai = {sizeof(ai)};