summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-05-25 17:26:45 +0000
committerRobert Pösel <robyer@seznam.cz>2014-05-25 17:26:45 +0000
commit9e178548c23cac22c5e39c73340508a46c4f4a4f (patch)
treeaad60fa03e58dc9e7f4e51f2c00de8195b5d980b
parentdbf48acfa880e48521db10abdf0965b58b0b72e9 (diff)
Facebook: Possible fix to not create duplicit contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@9308 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/FacebookRM/src/process.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 7b7673d2c7..26d7829b0f 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -77,13 +77,12 @@ void FacebookProto::ProcessBuddyList(void*)
if (!fbu->deleted)
{
- MCONTACT hContact = fbu->handle;
- if (!hContact)
- hContact = AddToContactList(fbu, CONTACT_FRIEND);
+ if (!fbu->handle) // just been added
+ fbu->handle = AddToContactList(fbu, CONTACT_FRIEND);
- ptrT client( getTStringA(hContact, "MirVer"));
+ ptrT client( getTStringA(fbu->handle, "MirVer"));
if (!client || _tcscmp(client, fbu->getMirVer()))
- setTString(hContact, "MirVer", fbu->getMirVer());
+ setTString(fbu->handle, "MirVer", fbu->getMirVer());
if (getDword(fbu->handle, "IdleTS", 0) != fbu->last_active) {
if ((fbu->idle || fbu->status_id == ID_STATUS_OFFLINE) && fbu->last_active > 0)
@@ -126,7 +125,7 @@ void FacebookProto::ProcessBuddyList(void*)
if (getDword(fbu->handle, FACEBOOK_KEY_DELETED, 0)) {
delSetting(fbu->handle, FACEBOOK_KEY_DELETED);
- std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
+ std::string url = FACEBOOK_URL_PROFILE + fbu->user_id;
ptrT szTitle( mir_utf8decodeT(fbu->real_name.c_str()));
NotifyEvent(szTitle, TranslateT("Contact is back on server-list."), fbu->handle, FACEBOOK_EVENT_OTHER, &url);
@@ -818,7 +817,7 @@ void FacebookProto::ProcessFeeds(void* data)
// Strip "Translate" link
pos2 = post_message.find("role=\"button\">");
if (pos2 != std::string::npos) {
- post_message = post_message.substr(0, pos2 + 14);
+ post_message = post_message.substr(0, pos2 + 14);
}
post_message = premsg + post_message;