aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 3cb974f..135549f 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -128,7 +128,7 @@ namespace QuickMedia {
class Matrix {
public:
PluginResult sync(RoomSyncMessages &room_messages);
- PluginResult get_joined_rooms(Rooms &rooms);
+ void get_room_join_updates(Rooms &new_rooms);
PluginResult get_all_synced_room_messages(std::shared_ptr<RoomData> room, Messages &messages);
PluginResult get_previous_room_messages(std::shared_ptr<RoomData> room, Messages &messages);
@@ -184,7 +184,9 @@ namespace QuickMedia {
void add_room(std::shared_ptr<RoomData> room);
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::unordered_map<std::string, std::shared_ptr<RoomData>> room_data_by_id;
+ std::vector<std::shared_ptr<RoomData>> rooms;
+ std::unordered_map<std::string, size_t> room_data_by_id; // value is an index into |rooms|
+ size_t room_list_read_index = 0;
std::mutex room_data_mutex;
std::string user_id;
std::string username;