aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 1460687..220a059 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -2100,6 +2100,8 @@ namespace QuickMedia {
message->thumbnail_url = message_content_extract_thumbnail_url(*content_json, homeserver);
message_content_extract_thumbnail_size(*content_json, message->thumbnail_size);
message->type = MessageType::VIDEO;
+ if(message->thumbnail_url.empty())
+ prefix = "🎥 play ";
} else if(strcmp(content_type.GetString(), "m.audio") == 0) {
const rapidjson::Value &url_json = GetMember(*content_json, "url");
if(!url_json.IsString() || strncmp(url_json.GetString(), "mxc://", 6) != 0)
@@ -2107,6 +2109,7 @@ namespace QuickMedia {
message->url = homeserver + "/_matrix/media/r0/download/" + (url_json.GetString() + 6);
message->type = MessageType::AUDIO;
+ prefix = "🎵 play ";
} else if(strcmp(content_type.GetString(), "m.file") == 0) {
const rapidjson::Value &url_json = GetMember(*content_json, "url");
if(!url_json.IsString() || strncmp(url_json.GetString(), "mxc://", 6) != 0)
@@ -2114,6 +2117,7 @@ namespace QuickMedia {
message->url = homeserver + "/_matrix/media/r0/download/" + (url_json.GetString() + 6);
message->type = MessageType::FILE;
+ prefix = "💾 download ";
} else if(strcmp(content_type.GetString(), "m.emote") == 0) { // this is a /me message, TODO: show /me messages differently
message->type = MessageType::TEXT;
prefix = "*" + room_data->get_user_display_name(user) + "* ";