aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connection.cpp8
-rw-r--r--lib/syncdata.cpp4
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 41dd71f6..8ceb2a44 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -812,14 +812,18 @@ void Connection::Private::consumeDevicesList(DevicesList&& devicesList)
{
#ifdef Quotient_E2EE_ENABLED
for(const auto &changed : devicesList.changed) {
- outdatedUsers += changed;
+ if(trackedUsers.contains(changed)) {
+ outdatedUsers += changed;
+ }
}
for(const auto &left : devicesList.left) {
trackedUsers -= left;
outdatedUsers -= left;
deviceKeys.remove(left);
}
- loadOutdatedUserDevices();
+ if(!outdatedUsers.isEmpty()) {
+ loadOutdatedUserDevices();
+ }
#endif
}
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp
index 9c54888c..d0533fc9 100644
--- a/lib/syncdata.cpp
+++ b/lib/syncdata.cpp
@@ -205,6 +205,10 @@ void SyncData::parseJson(const QJsonObject& json, const QString& baseDir)
fromJson(json.value("device_one_time_keys_count"_ls),
deviceOneTimeKeysCount_);
+ if(json.contains("device_lists")) {
+ fromJson(json.value("device_lists"), devicesList);
+ }
+
auto rooms = json.value("rooms"_ls).toObject();
auto totalRooms = 0;
auto totalEvents = 0;