summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-02-21 19:58:17 +0000
committerRobert Pösel <robyer@seznam.cz>2014-02-21 19:58:17 +0000
commitb8b41d0805ea46e47f4b5c94ad25581a467b5111 (patch)
treea13f756a8756ba69983d218405733dda16527a4f /protocols/FacebookRM/src
parent7f142a51cd32e024a1fd9d95b1311542febaf179 (diff)
Facebook: temporary workaround to "receive" unsupported attachments in messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@8206 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r--protocols/FacebookRM/src/json.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index ebb3864744..75eb094e6b 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -319,11 +319,11 @@ void parseAttachments(FacebookProto *proto, std::string *message_text, JSONNODE
}
}
- if (!attachments_text.empty()) {
- // TODO: have this as extra event, not replace or append message content
- if (!message_text->empty())
- *message_text += "\n\n";
-
+ // TODO: have this as extra event, not replace or append message content
+ if (!message_text->empty())
+ *message_text += "\n\n";
+
+ if (!attachments_text.empty()) {
// we can't use this as offline messages doesn't have it
/* JSONNODE *admin_snippet = json_get(it, "admin_snippet");
if (admin_snippet != NULL) {
@@ -345,6 +345,9 @@ void parseAttachments(FacebookProto *proto, std::string *message_text, JSONNODE
*message_text += ptrA(mir_utf8encodeT(title));
*message_text += attachments_text;
+ } else {
+ // TODO: better support for these attachments (parse it from "m_messaging" instead of "messaging"
+ *message_text += Translate("User sent you an unsupported attachment. Open your browser to actually see it.")
}
}
}