From 6fd2007e5133b4d34ab9089ff60a1f0aaa0f1e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 29 Aug 2015 09:32:57 +0000 Subject: Facebook: Fix receiving messages (broken in r15046) git-svn-id: http://svn.miranda-ng.org/main/trunk@15082 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/json.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'protocols/FacebookRM/src') 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"]; -- cgit v1.2.3