diff options
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index cd9d6f286a..743d2380bd 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -607,7 +607,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa facebook_user fbu;
fbu.user_id = json_as_pstring(from);
- MCONTACT hContact = proto->AddToContactList(&fbu, CONTACT_FRIEND);
+ MCONTACT hContact = proto->AddToContactList(&fbu, CONTACT_FRIEND); // only friends are able to send typing notifications
JSONNODE *st = json_get(it, "st");
if (json_as_int(st) == 1)
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 31ffbc4c28..20b66f14c4 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -130,9 +130,8 @@ void FacebookProto::SendTypingWorker(void *p) send_typing *typing = static_cast<send_typing*>(p);
- // TODO: don't send typing when we are not online?
- // Dont send typing notifications to contacts, that are offline or not friends
- if (getWord(typing->hContact, "Status", 0) == ID_STATUS_OFFLINE || getWord(typing->hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND) {
+ // Dont send typing notifications to not friends - Facebook won't give them that info anyway
+ if (getWord(typing->hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND) {
delete typing;
return;
}
|