diff options
-rw-r--r-- | protocols/FacebookRM/src/connection.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 16 |
3 files changed, 15 insertions, 9 deletions
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp index 84e40254de..c241d79fe8 100644 --- a/protocols/FacebookRM/src/connection.cpp +++ b/protocols/FacebookRM/src/connection.cpp @@ -49,8 +49,6 @@ void FacebookProto::ChangeStatus(void*) facy.buddies.clear();
facy.messages_ignore.clear();
- ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
-
OnLeaveChat(NULL, NULL);
SetAllContactStatuses(ID_STATUS_OFFLINE, true);
@@ -61,6 +59,8 @@ void FacebookProto::ChangeStatus(void*) Netlib_CloseHandle(facy.hMsgCon);
facy.hMsgCon = NULL;
+ ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
+
LOG("##### SignOff complete");
return;
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 7c42c1a951..6f57f221aa 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -118,7 +118,7 @@ HANDLE FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, boo void FacebookProto::SetAllContactStatuses(int status, bool reset_client)
{
for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if ( isChatRoom(hContact))
+ if (isChatRoom(hContact))
continue;
if (reset_client) {
@@ -140,7 +140,7 @@ void FacebookProto::SetAllContactStatuses(int status, bool reset_client) }*/
}
- if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != status)
+ if (getWord(hContact, "Status", 0) != status)
setWord(hContact, "Status", status);
}
}
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 2541fe07f8..24b9c3b7d0 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -52,18 +52,17 @@ void FacebookProto::ProcessBuddyList(void* data) char *status;
switch (fbu->status_id) {
case ID_STATUS_OFFLINE:
- status = "offline"; break;
+ status = "Offline"; break;
case ID_STATUS_ONLINE:
- status = "online"; break;
+ status = "Online"; break;
case ID_STATUS_ONTHEPHONE:
- on_mobile = true;
- status = "onthephone";
+ on_mobile = true;
+ status = "Phone";
if (!use_mobile_status)
fbu->status_id = ID_STATUS_OFFLINE;
break;
}
- LOG(" Now %s: %s", status, i->data->real_name.c_str());
if (!fbu->deleted)
{
@@ -124,6 +123,13 @@ void FacebookProto::ProcessBuddyList(void* data) // Check avatar change
CheckAvatarChange(fbu->handle, fbu->image_url);
}
+
+ std::string name_log = fbu->real_name;
+ if (name_log.empty() && i->data->handle)
+ name_log = ptrA(getStringA(i->data->handle, FACEBOOK_KEY_NAME));
+ if (name_log.empty())
+ name_log = fbu->user_id;
+ LOG(" Now %s: %s", status, name_log.c_str());
}
LOG("***** Buddy list processed");
|