diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-26 00:38:31 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-26 00:38:31 +0100 |
commit | e75fe2db48fea5663da43d6faf1c1e1d48de2c4f (patch) | |
tree | 59022bd661b5942e8d5427e1a29a80954ed69849 /src | |
parent | 0c4fd4700d6ee31f6b848d49a6aa7ebfa4a806fa (diff) |
Remove reply formatting from media file title in matrix media reply
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 2 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 9e8211a..92eb03c 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -6672,7 +6672,7 @@ namespace QuickMedia { const char *music_prefix = "🎵 Play "; const char *file_prefix = "💾 Download "; - std::string filename = selected_item_message->body; + std::string filename = message_to_qm_text(matrix, selected_item_message, false); if(string_starts_with(filename, video_prefix)) filename.erase(filename.begin(), filename.begin() + strlen(video_prefix)); else if(string_starts_with(filename, music_prefix)) diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 953543c..d93c64a 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -263,7 +263,7 @@ namespace QuickMedia { return colors[color_hash_code(user_id) % num_colors]; } - std::string formatted_text_remove_reply(const std::string &str) { + static std::string formatted_text_remove_reply(const std::string &str) { size_t last_mx_reply_end = str.rfind("</mx-reply>"); if(last_mx_reply_end == std::string::npos) return str; |