Open bwindels opened 3 years ago
this will allow all decryption to happen in the sync loop:
So either way we can get rid of notifyRoomKey and most backup code in RoomEncryption. When we support key shares, those would also come in through sync.
Not sure we actually want to do this, because if we fetch all, the key can be added after we fetched.
Right now, we try to get a single session from key backup when decryption fails. It's hard to know when is a good time to try to fetch from key backup though, especially when reading events that fail to decrypt but don't have their session in the backup either. You easily end up requesting sessions from backup when opening a room every time.
This is similar behaviour to what element web does.