aboutsummaryrefslogtreecommitdiff
path: root/lib/syncdata.cpp
diff options
context:
space:
mode:
authorAlexey Andreyev <aa13q@ya.ru>2019-08-23 17:03:14 +0300
committerAlexey Andreev <aa13q@ya.ru>2020-02-25 17:31:32 +0300
commit283208f8f891aafaaa0ae573bd8b9fcda783da12 (patch)
tree8546d63ddcc154eb6c1679875bdc9b366100bda9 /lib/syncdata.cpp
parent60c0f079f0366e501de6658b5fb56ec905da0c31 (diff)
downloadlibquotient-283208f8f891aafaaa0ae573bd8b9fcda783da12.tar.gz
libquotient-283208f8f891aafaaa0ae573bd8b9fcda783da12.zip
E2EE: implement SyncData::deviceOneTimeKeysCount
Signed-off-by: Alexey Andreev <aa13q@ya.ru>
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r--lib/syncdata.cpp7
1 files changed, 7 insertions, 0 deletions
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<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());
+ }
+
auto rooms = json.value("rooms"_ls).toObject();
JoinStates::Int ii = 1; // ii is used to make a JoinState value
auto totalRooms = 0;