aboutsummaryrefslogtreecommitdiff
path: root/plugins/Matrix.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Matrix.hpp')
-rw-r--r--plugins/Matrix.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index de66481..a3ce633 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -238,7 +238,6 @@ namespace QuickMedia {
int notification_power_level = 50;
size_t index = 0;
std::atomic<uint64_t> gpg_decrypt_message_id = 0;
- std::string chat_message;
private:
std::mutex user_mutex;
std::recursive_mutex room_mutex;
@@ -257,6 +256,11 @@ namespace QuickMedia {
std::set<std::string> tags;
};
+ struct RoomExtraData {
+ std::string chat_message;
+ std::string editing_message_id;
+ };
+
struct Invite {
std::string room_name;
std::string room_avatar_url;
@@ -745,6 +749,8 @@ namespace QuickMedia {
std::string get_media_url(const std::string &mxc_id);
+ RoomExtraData& get_room_extra_data(RoomData *room);
+
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);
@@ -847,5 +853,7 @@ namespace QuickMedia {
MessageQueue<std::shared_ptr<MatrixChatBodyDecryptJob>> decrypt_task;
std::thread decrypt_thread;
+
+ std::unordered_map<std::string, RoomExtraData> room_extra_data_by_id;
};
} \ No newline at end of file