diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-07-10 12:01:47 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-07-10 12:01:47 +0000 |
commit | 6d59534a80a984eba4f855315b73fc39f3e3a6e6 (patch) | |
tree | 74ef78c1deeb20c0e0b73066c294545a0fa544ac /protocols/FacebookRM/src/json.cpp | |
parent | 0d6df6501a6d19d0360db65470850a3950d0442c (diff) |
Facebook: Support receiving "video" attachments
git-svn-id: http://svn.miranda-ng.org/main/trunk@17083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 43d1fe34b1..702cf18060 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -203,7 +203,7 @@ void parseAttachments(FacebookProto *proto, std::string *message_text, const JSO for (auto itAttachment = attachments_.begin(); itAttachment != attachments_.end(); ++itAttachment) { const JSONNode &attach_ = legacy ? (*itAttachment) : (*itAttachment)["mercury"]; - type = attach_["attach_type"].as_string(); // "sticker", "photo", "file", "share", "animated_image" + type = attach_["attach_type"].as_string(); // "sticker", "photo", "file", "share", "animated_image", "video" if (type == "photo") { std::string filename = attach_["name"].as_string(); @@ -213,7 +213,7 @@ void parseAttachments(FacebookProto *proto, std::string *message_text, const JSO attachments_text += "\n" + (!filename.empty() ? "<" + filename + "> " : "") + absolutizeUrl(link) + "\n"; } } - else if (type == "file") { + else if (type == "file" || type == "video") { std::string filename = attach_["name"].as_string(); std::string link = attach_["url"].as_string(); @@ -297,6 +297,8 @@ void parseAttachments(FacebookProto *proto, std::string *message_text, const JSO newText = (attachments_.size() > 1) ? TranslateT("files") : TranslateT("a file"); else if (type == "photo") newText = (attachments_.size() > 1) ? TranslateT("photos") : TranslateT("a photo"); + else if (type == "video") + newText = TranslateT("a video"); else if (type == "animated_image") newText = TranslateT("a GIF"); else |