diff options
author | Tobias Fella <fella@posteo.de> | 2021-05-18 21:44:09 +0200 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2021-12-01 21:56:11 +0100 |
commit | e0945db3c4c539040f07ff7683efa9dc4e6b9e6a (patch) | |
tree | d69b3b8221a3a3f97b0146d3109ce0144ba59cdc /lib/connection.cpp | |
parent | 1f2ae094b29aa3fc237919659ced66c6d236d068 (diff) | |
download | libquotient-e0945db3c4c539040f07ff7683efa9dc4e6b9e6a.tar.gz libquotient-e0945db3c4c539040f07ff7683efa9dc4e6b9e6a.zip |
Actually load devices from sync data and filter relevant users
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 8 |
1 files changed, 6 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 } |