diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-11 10:55:49 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-11 10:55:49 +0100 |
commit | f3937a874ce08ff9983d922383d86862696b716e (patch) | |
tree | d12485d8e5997348577b2ac1c38a40f36843f361 /src/plugins | |
parent | d274d3a6dfc0864ec6a44e7d6948c2d873eb6f76 (diff) |
Matrix: do not format html in room description if body is plain text
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index e53cf71..17d4735 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -633,15 +633,15 @@ namespace QuickMedia { return nullptr; } - std::string message_to_qm_text(Matrix *matrix, const Message *message, bool allow_formatted_text) { + std::string message_to_qm_text(Matrix *matrix, const Message *message, bool allow_formatted_text, mgl::vec2i image_max_size) { if(message->body_is_formatted) - return formatted_text_to_qm_text(matrix, message->body.c_str(), message->body.size(), allow_formatted_text); + return formatted_text_to_qm_text(matrix, message->body.c_str(), message->body.size(), allow_formatted_text, image_max_size); else return message->body; } static std::string message_to_room_description_text(Matrix *matrix, Message *message, mgl::vec2i image_max_size = mgl::vec2i(0, 0)) { - std::string body = strip(formatted_text_to_qm_text(matrix, message->body.c_str(), message->body.size(), true, image_max_size)); + std::string body = strip(message_to_qm_text(matrix, message, true, image_max_size)); if(message->type == MessageType::REACTION) return "Reacted with: " + body; else if(message->related_event_type == RelatedEventType::REPLY) |