aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-07 14:23:49 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-07 14:24:32 +0100
commitc65a57e884de51cade584e3f01c7c5627aa6ebd8 (patch)
tree8dfdff1f60c83f15b354e415534bc4f7b62db6f7 /plugins
parentf791d96362cbe7ef8435e999adaaf05e6f2683a5 (diff)
Matrix: fix edit being replaced with old message when re-entering the room (without restart)
Add quote colors to 4chan, monospace for codeblocks
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 61814ac..4afe28e 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -21,10 +21,9 @@ namespace QuickMedia {
static const int AUTHOR_MAX_LENGTH = 48;
std::string remove_reply_formatting(const std::string &str);
- std::string message_get_body_remove_formatting(Message *message);
std::string extract_first_line_remove_newline_elipses(const std::string &str, size_t max_length);
mgl::Color user_id_to_color(const std::string &user_id);
- std::string formatted_text_to_qm_text(const char *str, size_t size);
+ std::string formatted_text_to_qm_text(const char *str, size_t size, bool allow_formatted_text);
struct TimestampedDisplayData {
std::string data;
@@ -234,7 +233,8 @@ namespace QuickMedia {
using Rooms = std::vector<RoomData*>;
- bool message_contains_user_mention(const std::string &msg, const std::string &username);
+ bool message_contains_user_mention(const Message *message, const std::string &username, const std::string &user_id);
+ bool message_contains_user_mention(const BodyItem *body_item, const std::string &username, const std::string &user_id);
bool message_is_timeline(Message *message);
void body_set_selected_item_by_url(Body *body, const std::string &url);
std::string create_transaction_id();
@@ -619,6 +619,7 @@ namespace QuickMedia {
void append_system_message(RoomData *room_data, std::shared_ptr<Message> message);
std::string body_to_formatted_body(RoomData *room, const std::string &body);
+ void on_exit_room(RoomData *room);
// Calls the |MatrixDelegate| pending events.
// Should be called from the main (ui) thread