From 18d9a96928b22e847967b41a89eec6f636a260b2 Mon Sep 17 00:00:00 2001 From: matej Date: Tue, 6 Feb 2018 17:06:44 +0100 Subject: Facebook: added parsing for messenger invitation --- protocols/FacebookRM/src/json.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/FacebookRM/src/json.cpp') diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 6a70485d92..af00c80dce 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -357,7 +357,7 @@ void FacebookProto::ParseAttachments(std::string &message_text, const JSONNode & if (!story_.empty()) { hasAttachement = true; std::string type = story_["target"]["__typename"].as_string(); - if (type == "ExternalUrl" || type == "Story") { + if (type == "ExternalUrl" || type == "Story" || type == "QuickInvite") { newText = TranslateT("a link"); std::string title = story_["title_with_entities"]["text"].as_string(); @@ -380,7 +380,7 @@ void FacebookProto::ParseAttachments(std::string &message_text, const JSONNode & attachments_text += description + "\n"; attachments_text += absolutizeUrl(link) + "\n"; } - } + } else debugLogA("json::parseAttachments (%s) - Unknown extensible attachment type %s", legacy ? "legacy" : "not legacy", type.c_str()); } // else debugLogA("json::parseAttachments (%s) - Unknown attachment type", legacy ? "legacy" : "not legacy"); @@ -457,7 +457,7 @@ void FacebookProto::ParseAttachments(std::string &message_text, const JSONNode & } else if (const JSONNode story_ = attach_["extensible_attachment"]["story_attachment"]) { std::string type = story_["target"]["__typename"].as_string(); - if (type == "ExternalUrl" || type == "Story") { + if (type == "ExternalUrl" || type == "Story" || type == "QuickInvite") { newText = TranslateT("a link"); std::string title = story_["title_with_entities"]["text"].as_string(); -- cgit v1.2.3