From 283208f8f891aafaaa0ae573bd8b9fcda783da12 Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Fri, 23 Aug 2019 17:03:14 +0300 Subject: E2EE: implement SyncData::deviceOneTimeKeysCount Signed-off-by: Alexey Andreev --- lib/syncdata.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/syncdata.cpp') diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index 89c512a2..6e68e2cd 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -178,6 +178,13 @@ void SyncData::parseJson(const QJsonObject& json, const QString& baseDir) accountData = load(json, "account_data"_ls); toDeviceEvents = load(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()); + } + auto rooms = json.value("rooms"_ls).toObject(); JoinStates::Int ii = 1; // ii is used to make a JoinState value auto totalRooms = 0; -- cgit v1.2.3