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/events | |
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/events')
-rw-r--r-- | lib/events/roomkeyevent.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/events/roomkeyevent.h b/lib/events/roomkeyevent.h index 2bda3086..3093db41 100644 --- a/lib/events/roomkeyevent.h +++ b/lib/events/roomkeyevent.h @@ -12,7 +12,9 @@ public: DEFINE_EVENT_TYPEID("m.room_key", RoomKeyEvent) explicit RoomKeyEvent(const QJsonObject& obj); - explicit RoomKeyEvent(const QString& algorithm, const QString& roomId, const QString &sessionId, const QString& sessionKey, const QString& senderId); + explicit RoomKeyEvent(const QString& algorithm, const QString& roomId, + const QString& sessionId, const QString& sessionKey, + const QString& senderId); QString algorithm() const { return contentPart<QString>("algorithm"_ls); } QString roomId() const { return contentPart<QString>(RoomIdKeyL); } |