summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/FacebookRM')
-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.")
}
}
}