diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-12 19:05:13 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-12 19:05:13 +0100 |
commit | 01f23292bf2451a0c7b9ada88c6314dcb09509b1 (patch) | |
tree | 2423c0abecd39f314f3475b2288d68a702fd6344 /plugins | |
parent | 224a5f3b2ed2141a94940fe73fc8ccb4b2f8d962 (diff) |
Matrix: add option to silence invites without declining them or hiding them (ignore)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Matrix.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<UserInfo> 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<std::function<void()>> ui_thread_tasks; std::vector<std::unique_ptr<RoomData>> rooms; @@ -793,5 +797,6 @@ namespace QuickMedia { std::unordered_set<std::string> my_events_transaction_ids; std::unordered_map<std::string, CustomEmoji> custom_emoji_by_key; + std::unordered_set<std::string> silenced_invites; }; }
\ No newline at end of file |