summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-21 01:08:29 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-21 01:08:29 +0000
commit48b601b07b6078b323e2526ec16c18ec9d430720 (patch)
treeccaed59de026f847f641dd5d498f01e2c33053bb
parent3e39b15e9c151e2485a21af03b75c47d404d0823 (diff)
Facebook: Fixed not receiving messages from not-friends. Fixed title for notifications from multi chats.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4770 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/FacebookRM/src/json.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index e51ef68fe2..8d705b4323 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -288,6 +288,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
const Array& messagesArray = objRoot["ms"];
std::string last_msg = "";
+ std::string thread_mid = "";
for (Array::const_iterator itMessage(messagesArray.Begin()); itMessage != messagesArray.End(); ++itMessage)
{
@@ -371,7 +372,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
continue;
// Ignore group chat messages
- if (tid.Value().substr(0, 3) == "id." && mid.Value().substr(0, 4) == "mid.")
+ if (thread_mid == mid.Value())
continue;
//proto->Log("????? Checking time %15.2f > %15.2f", time_sent.Value(), proto->facy.last_message_time_);
@@ -412,10 +413,11 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
const Object& messageContent = objMember["msg"];
const String& text = messageContent["text"];
-
-
last_msg = text.Value();
+ // remember this thread mid so we can ignore it in "messaging" section
+ const String& mid = messageContent["messageId"];
+ thread_mid = mid.Value();
std::string popup_text = utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(from_name.Value()));
@@ -423,9 +425,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa
popup_text += utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(text.Value()));
- std::string title = Translate("Multichat");
- title += ": ";
- title += utils::text::special_expressions_decode(
+ std::string title = utils::text::special_expressions_decode(
utils::text::slashu_to_utf8(to_name.Value()));
std::string url = "/?action=read&sk=inbox&page&query&tid=";