aboutsummaryrefslogtreecommitdiff
path: root/lib/syncdata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r--lib/syncdata.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp
index a9ec5ee7..e6472e18 100644
--- a/lib/syncdata.cpp
+++ b/lib/syncdata.cpp
@@ -182,12 +182,8 @@ void SyncData::parseJson(const QJsonObject& json, const QString& baseDir)
accountData = load<Events>(json, "account_data"_ls);
toDeviceEvents = load<Events>(json, "to_device"_ls);
- auto deviceOneTimeKeysCountVariantHash =
- json.value("device_one_time_keys_count"_ls).toObject().toVariantHash();
- for (auto key : deviceOneTimeKeysCountVariantHash.keys()) {
- deviceOneTimeKeysCount_.insert(
- key, deviceOneTimeKeysCountVariantHash.value(key).toInt());
- }
+ fromJson(json.value("device_one_time_keys_count"_ls),
+ deviceOneTimeKeysCount_);
auto rooms = json.value("rooms"_ls).toObject();
JoinStates::Int ii = 1; // ii is used to make a JoinState value