forgot to hit ctrl+s *shame*

This commit is contained in:
Sorunome 2020-05-19 09:58:59 +02:00
parent c5e4e2c751
commit 867b9c9123
No known key found for this signature in database
GPG key ID: B19471D07FC9BE9C

View file

@ -1357,6 +1357,11 @@ class Client {
if (event['type'] == 'm.room.encrypted') { if (event['type'] == 'm.room.encrypted') {
update = update.decrypt(room); 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) { if (type != 'ephemeral' && database != null) {
await database.storeEventUpdate(id, update); await database.storeEventUpdate(id, update);
} }