aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-10 13:01:50 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-10 13:01:50 +0200
commit8af5901fb893c3fc25b31bf484a90b47d1c24c2c (patch)
treea2898fa4357a264b1ba98746379cabf0c9e55b85 /plugins
parentfde558b220118ff873cc2e735f6ec167ebcf5167 (diff)
Matrix: add ctrl+p/ctrl+d to pin/unpin messages
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index e94cc13..39e0a57 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -119,7 +119,7 @@ namespace QuickMedia {
void release_room_lock();
const std::vector<std::shared_ptr<Message>>& get_messages_thread_unsafe() const;
- const std::vector<std::string>& get_pinned_events_unsafe() const;
+ const std::vector<std::string>& get_pinned_events_thread_unsafe() const;
bool has_prev_batch();
void set_prev_batch(const std::string &new_prev_batch);
@@ -137,7 +137,7 @@ namespace QuickMedia {
std::string get_avatar_url();
void set_pinned_events(std::vector<std::string> new_pinned_events);
- std::set<std::string>& get_tags_unsafe();
+ std::set<std::string>& get_tags_thread_unsafe();
void clear_data();
@@ -543,6 +543,9 @@ namespace QuickMedia {
// |message| is from |BodyItem.userdata| and is of type |Message*|
PluginResult delete_message(RoomData *room, void *message, std::string &err_msg);
+ PluginResult pin_message(RoomData *room, const std::string &event_id);
+ PluginResult unpin_message(RoomData *room, const std::string &event_id);
+
PluginResult load_cached_session();
PluginResult on_start_typing(RoomData *room);
@@ -588,6 +591,8 @@ namespace QuickMedia {
std::string body_to_formatted_body(RoomData *room, const std::string &body);
std::string create_formatted_body_for_message_reply(RoomData *room, const Message *message, const std::string &body);
+ PluginResult set_pinned_events(RoomData *room, const std::vector<std::string> &pinned_events, bool is_add);
+
PluginResult set_qm_last_read_message_timestamp(RoomData *room, int64_t timestamp);
PluginResult parse_sync_response(const rapidjson::Document &root, bool is_additional_messages_sync, bool initial_sync);