From ba24ce23e126706d0985510c44c42e2ff5a3e0b7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 1 Aug 2021 03:12:42 +0200 Subject: Matrix: implement pinned events change messages --- src/plugins/Matrix.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index 2e758c5..8cc98fa 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -2379,6 +2379,17 @@ namespace QuickMedia { if(message->body.empty()) return nullptr; + return message; + } else if(strcmp(type_json.GetString(), "m.room.pinned_events") == 0) { + auto message = std::make_shared(); + message->type = MessageType::SYSTEM; + message->user = user; + message->event_id = event_id_str; + message->body = extract_first_line_remove_newline_elipses(room_data->get_user_display_name(user_sender), AUTHOR_MAX_LENGTH) + " changed the pinned messages for the room."; + message->related_event_id = std::move(related_event_id); + message->related_event_type = related_event_type; + message->timestamp = timestamp; + message->transaction_id = std::move(transaction_id); return message; } else { auto message = std::make_shared(); -- cgit v1.2.3