diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-13 12:07:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 12:07:28 +0100 |
commit | 301d29e8db272938b0977af5db872c80f89fd708 (patch) | |
tree | 4da15b959ed522db941237826ea6aa4539f1773c /lib/syncdata.cpp | |
parent | ef81c79c4e7d24d63d1520ddefef347c11052235 (diff) | |
parent | 56d9a0addaabf2cec78e1c82a9846997a3669736 (diff) | |
download | libquotient-301d29e8db272938b0977af5db872c80f89fd708.tar.gz libquotient-301d29e8db272938b0977af5db872c80f89fd708.zip |
Merge pull request #346 from quotient-im/aa13q-e2ee-encrypted-msg
E2EE: implement receiving of the messages
Diffstat (limited to 'lib/syncdata.cpp')
-rw-r--r-- | lib/syncdata.cpp | 7 |
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; |