diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-27 19:09:26 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-29 08:22:35 +0200 |
commit | 0f8335a32debc4c61d9fc9875c79c0ba6ba05357 (patch) | |
tree | fb78230a898754b2df982b890a4129839937f110 /lib/csapi | |
parent | 64797165f04a16d290dd27c2f962060b40f85be3 (diff) | |
download | libquotient-0f8335a32debc4c61d9fc9875c79c0ba6ba05357.tar.gz libquotient-0f8335a32debc4c61d9fc9875c79c0ba6ba05357.zip |
Move some Meg/Olm session logic from Room::Private to Connection::Private
Functions (Room::Private::)createOlmSession, payloadForUserDevice
and sendRoomKeyToDevices don't have a lot to do with the given Room
object but deal with quite a few things stored in Connection. This
commit moves them to Connection::Private, exposing
sendSessionKeyToDevices (the new name for sendRoomKeyToDevices) in
Connection so that Room could call it from Room::P::sendMegolmSession().
While moving these over, a few additional things were adjusted:
- more functions marked as const
- a few functions could be moved now from Connection
to Connection::Private
- false slots in Connection (such as picklingMode) are moved out of
the slots block
- keys.yml in Matrix CS API definitions has been adjusted to match
the real structure of `/claim` response (see quotient-im/matrix-spec
repo); csapi/keys.h has been regenerated accordingly.
Diffstat (limited to 'lib/csapi')
-rw-r--r-- | lib/csapi/keys.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/csapi/keys.h b/lib/csapi/keys.h index ce1ca9ed..bcf1ad41 100644 --- a/lib/csapi/keys.h +++ b/lib/csapi/keys.h @@ -207,9 +207,9 @@ public: /// /// See the [key algorithms](/client-server-api/#key-algorithms) section for /// information on the Key Object format. - QHash<QString, QHash<QString, QVariant>> oneTimeKeys() const + QHash<QString, QHash<QString, QJsonObject>> oneTimeKeys() const { - return loadFromJson<QHash<QString, QHash<QString, QVariant>>>( + return loadFromJson<QHash<QString, QHash<QString, QJsonObject>>>( "one_time_keys"_ls); } }; |