summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-01-23 01:22:06 +0100
committerRobert Pösel <robyer@seznam.cz>2017-01-23 01:22:06 +0100
commit758809172f32dfe41d78dbbec19a7b24179fa27f (patch)
treeff179365939aa869f93991d7b9396d81f83b7c7a /protocols
parent26890d819c469ffc7a01352d828eeaf659f82be8 (diff)
Facebook: Fix loading offline messages
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/src/json.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index d577fb882c..e559f982f8 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -1089,9 +1089,14 @@ int facebook_json_parser::parse_unread_threads(std::string *data, std::vector< s
return EXIT_FAILURE;
for (auto it = unread_threads.begin(); it != unread_threads.end(); ++it) {
- const JSONNode &thread_ids = (*it)["thread_fbids"];
+ // For multi user chats
+ const JSONNode &thread_fbids = (*it)["thread_fbids"];
+ for (auto jt = thread_fbids.begin(); jt != thread_fbids.end(); ++jt)
+ threads->push_back((*jt).as_string());
- for (auto jt = thread_ids.begin(); jt != thread_ids.end(); ++jt)
+ // For classic conversations
+ const JSONNode &other_user_fbids = (*it)["other_user_fbids"];
+ for (auto jt = other_user_fbids.begin(); jt != other_user_fbids.end(); ++jt)
threads->push_back((*jt).as_string());
}