From e75fe2db48fea5663da43d6faf1c1e1d48de2c4f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 26 Nov 2022 00:38:31 +0100 Subject: Remove reply formatting from media file title in matrix media reply --- src/QuickMedia.cpp | 2 +- src/plugins/Matrix.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(""); if(last_mx_reply_end == std::string::npos) return str; -- cgit v1.2.3-70-g09d2