diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-01 13:32:27 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-01 13:32:27 +0000 |
commit | 597d4be9de7903814c01631fbd4180a6f297ce92 (patch) | |
tree | 4ba2e27133c437e61d7dceffce251d7bf6dc582d /protocols/FacebookRM/src/communication.cpp | |
parent | f7782fbf614361339617da21e6220044ffcf6822 (diff) |
Facebook: More improvements for chatrooms
git-svn-id: http://svn.miranda-ng.org/main/trunk@11194 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 773abb937a..c2eec7c6ee 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -1326,7 +1326,10 @@ int facebook_client::send_message(MCONTACT hContact, const std::string &message_ std::string mid = utils::text::source_get_value(&resp.data, 2, "\"message_id\":\"", "\""); if (mid.empty()) mid = utils::text::source_get_value(&resp.data, 2, "\"mid\":\"", "\""); - parent->setString(hContact, FACEBOOK_KEY_MESSAGE_ID, mid.c_str()); + + // For classic contacts remember last message id + if (!parent->isChatRoom(hContact)) + parent->setString(hContact, FACEBOOK_KEY_MESSAGE_ID, mid.c_str()); // Remember last action timestamp std::string timestamp = utils::text::source_get_value(&resp.data, 2, "\"timestamp\":", ","); @@ -1339,9 +1342,7 @@ int facebook_client::send_message(MCONTACT hContact, const std::string &message_ case 1356003: // Contact is offline { - MCONTACT hContact = parent->ContactIDToHContact(message_recipient); - if (hContact != NULL) - parent->setWord(hContact, "Status", ID_STATUS_OFFLINE); + parent->setWord(hContact, "Status", ID_STATUS_OFFLINE); return SEND_MESSAGE_ERROR; } |