diff options
-rw-r--r-- | lib/room.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 688ba5d4..6c5a9d33 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1596,6 +1596,14 @@ void Room::handleRoomKeyEvent(const RoomKeyEvent& roomKeyEvent, roomKeyEvent.sessionKey())) { qCWarning(E2EE) << "added new inboundGroupSession:" << d->groupSessions.size(); + for (unsigned long int i = 0; i < d->timeline.size(); i++) { + if (auto encryptedEvent = d->timeline[i].viewAs<EncryptedEvent>()) { + auto decrypted = decryptMessage(*encryptedEvent); + if(decrypted) { + d->timeline[i].replaceEvent(std::move(decrypted)); + } + } + } } #endif // Quotient_E2EE_ENABLED } |