diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-12 15:07:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-12 15:07:16 +0100 |
commit | 224a5f3b2ed2141a94940fe73fc8ccb4b2f8d962 (patch) | |
tree | 4a51b48205042279d7cdfa065ae55120a09cc9d9 /plugins | |
parent | 4197fd3d7aaa84197eb17e700fb27093293f228b (diff) |
Matrix: fix editing reply breaking body and formatted text, edits should always show latest edit, set read marker to proper latest message
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Matrix.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index ac4487c..61239fe 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -29,6 +29,7 @@ namespace QuickMedia { // |image_max_size| 0, 0 means no max size std::string message_to_qm_text(Matrix *matrix, const Message *message, bool allow_formatted_text = true, mgl::vec2i image_max_size = mgl::vec2i(0, 0)); std::string pantalaimon_url_to_homeserver_url(Matrix *matrix, const std::string &url); + Message* get_latest_message_in_edit_chain(Message *message); struct TimestampedDisplayData { std::string data; @@ -713,6 +714,7 @@ namespace QuickMedia { void formatted_body_add_line(RoomData *room, std::string &formatted_body, const std::string &line_str, const std::unordered_map<std::string, CustomEmoji> &custom_emojis); void replace_mentions(RoomData *room, std::string &text); std::string create_formatted_body_for_message_reply(RoomData *room, const Message *message, const std::string &body); + std::string create_formatted_body_for_message_edit(RoomData *room, const Message *replied_to_message, const std::string &body); PluginResult set_pinned_events(RoomData *room, const std::vector<std::string> &pinned_events, bool is_add); |