diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-26 13:25:09 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-26 13:25:09 +0100 |
commit | ec4110c63443e29c78fdf0f72af08f5395ec48f7 (patch) | |
tree | 9231a07da3124c70758ffa370be8c3ebb8eca3f7 /lib/room.cpp | |
parent | 3ba2acce470407854bb38b2633675e916a51a904 (diff) | |
download | libquotient-ec4110c63443e29c78fdf0f72af08f5395ec48f7.tar.gz libquotient-ec4110c63443e29c78fdf0f72af08f5395ec48f7.zip |
Refactoring around Connection::onSyncSuccess()
The method grew large and a bit unwieldy over the years.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 43a42492..16f81813 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1278,7 +1278,8 @@ RoomEventPtr Room::decryptMessage(const EncryptedEvent& encryptedEvent) #endif // Quotient_E2EE_ENABLED } -void Room::handleRoomKeyEvent(RoomKeyEvent* roomKeyEvent, QString senderKey) +void Room::handleRoomKeyEvent(const RoomKeyEvent& roomKeyEvent, + const QString& senderKey) { #ifndef Quotient_E2EE_ENABLED Q_UNUSED(roomKeyEvent); @@ -1286,12 +1287,12 @@ void Room::handleRoomKeyEvent(RoomKeyEvent* roomKeyEvent, QString senderKey) qCWarning(E2EE) << "End-to-end encryption (E2EE) support is turned off."; return; #else // Quotient_E2EE_ENABLED - if (roomKeyEvent->algorithm() != MegolmV1AesSha2AlgoKey) { + if (roomKeyEvent.algorithm() != MegolmV1AesSha2AlgoKey) { qCWarning(E2EE) << "Ignoring unsupported algorithm" - << roomKeyEvent->algorithm() << "in m.room_key event"; + << roomKeyEvent.algorithm() << "in m.room_key event"; } - if (d->addInboundGroupSession(senderKey, roomKeyEvent->sessionId(), - roomKeyEvent->sessionKey())) { + if (d->addInboundGroupSession(senderKey, roomKeyEvent.sessionId(), + roomKeyEvent.sessionKey())) { qCDebug(E2EE) << "added new inboundGroupSession:" << d->groupSessions.count(); } |