summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-09-04 14:04:58 +0000
committerRobert Pösel <robyer@seznam.cz>2016-09-04 14:04:58 +0000
commitabb7234475a08089b046b05de7a872d13491539b (patch)
tree351459b322cbb09197225b399042ba5d3dfc7a52 /protocols/FacebookRM/src/json.cpp
parent1cfb77837fef9854796ee06929caa673fd3e6a6b (diff)
Facebook: Handle unsubscribe events in chat; improve also subscribe event
git-svn-id: http://svn.miranda-ng.org/main/trunk@17250 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r--protocols/FacebookRM/src/json.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 71d706a4e1..310a61b0aa 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -100,6 +100,14 @@ void parseMessageType(FacebookProto *proto, facebook_message &message, const JSO
}
else if (logType == "log:unsubscribe") {
message.type = UNSUBSCRIBE;
+
+ const JSONNode &fbids_ = log_data_["removed_participants"];
+ for (auto it2 = fbids_.begin(); it2 != fbids_.end(); ++it2) {
+ std::string id = (*it2).as_string().substr(5); // strip "fbid:" prefix
+ if (!message.data.empty())
+ message.data += ";";
+ message.data += id;
+ }
}
else if (logType == "log:thread-name") {
message.type = THREAD_NAME;