diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-03-27 15:54:37 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-03-27 15:54:37 +0100 |
commit | 3eca2373621b4fbd3189df75ada884861536113a (patch) | |
tree | f4aafe02525ef5cf2a6f4bd1e250a60e6ff0453d /src/plugins | |
parent | 54607d704bcfc757fa2cdbe3f0154bc39e95194c (diff) |
bla
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 4 |
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) + "* "; |