From 867b9c9123720507fdafa3c484f6f0df94611e46 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Tue, 19 May 2020 09:58:59 +0200 Subject: [PATCH] forgot to hit ctrl+s *shame* --- lib/src/client.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/client.dart b/lib/src/client.dart index 2fa06a7..c25678d 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1357,6 +1357,11 @@ class Client { if (event['type'] == 'm.room.encrypted') { update = update.decrypt(room); } + if (update.eventType == 'm.room.encrypted' && database != null) { + // the event is still encrytped....let's try fetching the keys from the database! + await room.loadInboundGroupSessionKey(event['content']['session_id']); + update = update.decrypt(room); + } if (type != 'ephemeral' && database != null) { await database.storeEventUpdate(id, update); }