diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-05-31 07:03:01 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-05-31 07:03:01 +0000 |
commit | 63bea9fe2a7f02f9246db900c08501fd6f567918 (patch) | |
tree | 277618b1f0901c3d2a99146cbbf655c410a3d5c9 /protocols/FacebookRM/src/json.cpp | |
parent | 656dc1d17f378e819fb6723b7cd1dc8b14d22a5e (diff) |
Facebook: Fix loading notifications on login again (now really) and marking them as read
git-svn-id: http://svn.miranda-ng.org/main/trunk@13924 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 3945ddb89e..df528d7cc9 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -227,6 +227,12 @@ int facebook_json_parser::parse_notifications(std::string *data, std::map< std:: facebook_notification* notification = new facebook_notification(); notification->id = id_.as_string(); + + // Fix notification ID + std::string::size_type pos = notification->id.find(":"); + if (pos != std::string::npos) + notification->id = notification->id.substr(pos + 1); + 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()); @@ -581,6 +587,7 @@ int facebook_json_parser::parse_messages(std::string *data, std::vector< faceboo notification->id = alert_id.as_string(); notification->time = timestamp; + // Fix notification ID std::string::size_type pos = notification->id.find(":"); if (pos != std::string::npos) notification->id = notification->id.substr(pos + 1); |