summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-08-29 09:32:57 +0000
committerRobert Pösel <robyer@seznam.cz>2015-08-29 09:32:57 +0000
commit6fd2007e5133b4d34ab9089ff60a1f0aaa0f1e33 (patch)
treeb39c0e807c25f6d1bc11b8cd5cc1c0186e1e4405
parent6ad13d38c1ac88d11558b92c03b129f77f032e98 (diff)
Facebook: Fix receiving messages (broken in r15046)
git-svn-id: http://svn.miranda-ng.org/main/trunk@15082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/FacebookRM/src/json.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 69b28da0ad..59ca61e479 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -431,11 +431,12 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector< facebo
if (t == "messaging") {
// various messaging stuff (received and sent messages, getting seen info)
- const JSONNode &ev = (*it)["event"];
- if (!ev)
+ const JSONNode &ev_ = (*it)["event"];
+ if (!ev_)
continue;
- if (ev.as_string() == "read_receipt") {
+ std::string ev = ev_.as_string();
+ if (ev == "read_receipt") {
// user read message
const JSONNode &reader_ = (*it)["reader"];
const JSONNode &time_ = (*it)["time"];
@@ -483,7 +484,7 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector< facebo
if (hContact)
proto->facy.insert_reader(hContact, timestamp, reader);
}
- else if (t == "deliver") {
+ else if (ev == "deliver") {
// inbox message (multiuser or direct)
const JSONNode &msg = (*it)["message"];