From ec473b50196a5d04bd0fbcf67f465b5703b5138a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 5 Jul 2016 17:58:47 +0000 Subject: Facebook: Prepare for showing reaction icons for notifications (needs support in Popup+ and YAPP) git-svn-id: http://svn.miranda-ng.org/main/trunk@17061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/json.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'protocols/FacebookRM/src/json.cpp') diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 376e5da431..c0c3e02845 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -135,6 +135,7 @@ int facebook_json_parser::parse_notifications(std::string *data, std::map< std:: const JSONNode &time_ = (*it)["timestamp"]["time"]; const JSONNode &text_ = (*it)["title"]["text"]; const JSONNode &url_ = (*it)["url"]; + const JSONNode &icon_ = (*it)["icon"]["uri"]; // Ignore empty and old notifications if (!text_ || !state_ || state_.as_string() == "SEEN_AND_READ" || !time_) @@ -152,6 +153,7 @@ int facebook_json_parser::parse_notifications(std::string *data, std::map< std:: notification->link = url_.as_string(); notification->text = utils::text::html_entities_decode(utils::text::slashu_to_utf8(text_.as_string())); notification->time = utils::time::from_string(time_.as_string()); + notification->setIcon(icon_.as_string()); // Write notification to chatroom proto->UpdateNotificationsChatRoom(notification); @@ -522,6 +524,7 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vectorlink = url.as_string(); notification->id = alert_id.as_string(); notification->time = timestamp; + notification->setIcon(icon_.as_string()); // Fix notification ID std::string::size_type pos = notification->id.find(":"); -- cgit v1.2.3