diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-08-01 03:12:42 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-08-01 03:12:42 +0200 |
commit | ba24ce23e126706d0985510c44c42e2ff5a3e0b7 (patch) | |
tree | bcaf5b9a21f0717f7f9bcfd77bffa6e93413e435 | |
parent | 738411fcb52f2dce050f200eeff307c7a0a1f13c (diff) |
Matrix: implement pinned events change messages
-rw-r--r-- | src/plugins/Matrix.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ -2380,6 +2380,17 @@ namespace QuickMedia { return nullptr; return message; + } else if(strcmp(type_json.GetString(), "m.room.pinned_events") == 0) { + auto message = std::make_shared<Message>(); + 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<Message>(); message->type = MessageType::UNIMPLEMENTED; |