From 01f23292bf2451a0c7b9ada88c6314dcb09509b1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 12 Nov 2022 19:05:13 +0100 Subject: Matrix: add option to silence invites without declining them or hiding them (ignore) --- plugins/Matrix.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins') diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 61239fe..788050b 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -671,6 +671,9 @@ namespace QuickMedia { PluginResult join_room(const std::string &room_id_or_name); PluginResult leave_room(const std::string &room_id); + bool is_invite_silenced(const std::string &room_id, int64_t timestamp); + void silence_invite(const std::string &room_id, int64_t timestamp); + // If |since| is empty, then the first page is fetched PluginResult get_public_rooms(const std::string &server, const std::string &search_term, const std::string &since, BodyItems &rooms, std::string &next_batch); @@ -754,6 +757,7 @@ namespace QuickMedia { void clear_sync_cache_for_new_sync(); std::shared_ptr get_user_by_id(RoomData *room, const std::string &user_id, bool *is_new_user = nullptr, bool create_if_not_found = true); std::string get_filter_cached(); + void load_silenced_invites(); private: MessageQueue> ui_thread_tasks; std::vector> rooms; @@ -793,5 +797,6 @@ namespace QuickMedia { std::unordered_set my_events_transaction_ids; std::unordered_map custom_emoji_by_key; + std::unordered_set silenced_invites; }; } \ No newline at end of file -- cgit v1.2.3