aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Matrix.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 230232a..5355208 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -1816,7 +1816,7 @@ namespace QuickMedia {
// Then the daemon will do the sync and matrix processes will ask that daemon for the cached data
// and fetch previous messages etc themselves.
if(!matrix_instance_already_running) {
- sync_cache_file = fopen(matrix_cache_dir.data.c_str(), initial_sync ? "wb" : "ab");
+ sync_cache_file = fopen(matrix_cache_dir.data.c_str(), "ab");
if(sync_cache_file) {
if(json_root.IsObject()) {
rapidjson::StringBuffer buffer;
@@ -2224,8 +2224,6 @@ namespace QuickMedia {
if(!rooms_json.IsObject())
return PluginResult::OK;
- std::unordered_set<RoomData*> existing_rooms;
-
const rapidjson::Value &join_json = GetMember(rooms_json, "join");
if(join_json.IsObject()) {
for(auto const &it : join_json.GetObject()) {
@@ -2247,8 +2245,6 @@ namespace QuickMedia {
add_room(std::move(new_room));
is_new_room = true;
}
- if(initial_sync)
- existing_rooms.insert(room);
const rapidjson::Value &state_json = GetMember(it.value, "state");
if(state_json.IsObject()) {
@@ -2329,17 +2325,6 @@ namespace QuickMedia {
const rapidjson::Value &invite_json = GetMember(rooms_json, "invite");
add_invites(invite_json);
- if(initial_sync) {
- std::lock_guard<std::recursive_mutex> lock(room_data_mutex);
- for(auto &room : rooms) {
- if(existing_rooms.find(room.get()) == existing_rooms.end()) {
- RoomData *room_p = room.get();
- ui_thread_tasks.push([this, room_p]{ delegate->leave_room(room_p, LeaveType::LEAVE, ""); });
- remove_room(room->id);
- }
- }
- }
-
return PluginResult::OK;
}