diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-01 13:24:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-01 13:24:16 +0100 |
commit | 13935702620305c5baaf6403417cc75a9b706fea (patch) | |
tree | ce603c498c69b3d8bc88f944d016961689df7856 /plugins | |
parent | 7292fe11254109266e7adb9937e5f0fa797711f6 (diff) |
Matrix: create room immediately after receiving join response, instead of waiting for join sync message
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Matrix.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 3d3c4b2..6a876d0 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -423,11 +423,14 @@ namespace QuickMedia { PluginResult upload_file(RoomData *room, const std::string &filepath, UploadInfo &file_info, UploadInfo &thumbnail_info, std::string &err_msg); void add_room(std::unique_ptr<RoomData> room); void remove_room(const std::string &room_id); + void set_invite(const std::string &room_id, Invite invite); + // Returns true if an invite for |room_id| exists + bool remove_invite(const std::string &room_id); DownloadResult download_json(rapidjson::Document &result, const std::string &url, std::vector<CommandArg> additional_args, bool use_browser_useragent = false, std::string *err_msg = nullptr) const; private: std::vector<std::unique_ptr<RoomData>> rooms; std::unordered_map<std::string, size_t> room_data_by_id; // value is an index into |rooms| - std::mutex room_data_mutex; + std::recursive_mutex room_data_mutex; std::string user_id; std::string username; std::string access_token; @@ -436,8 +439,10 @@ namespace QuickMedia { std::string next_batch; std::unordered_map<std::string, Invite> invites; + std::mutex invite_mutex; std::thread sync_thread; bool sync_running = false; + MatrixDelegate *delegate = nullptr; }; }
\ No newline at end of file |