Open bnjbvr opened 3 weeks ago
My bad, I didn't consider that a room could be upgraded to use encryption 🙈
After discussing this we agreed a potential fix for this could be:
RwLock<Option<bool>> is_encrypted
in the state, that's touched by the different sources, populated by either the previous events or room.is_encrypted().await.ok()
, then updated via state events from sync.
Otherwise, the timeline won't correctly handle a transition from an unencrypted room to an encrypted one, which will be visible in embedders as shields not appearing in this case. Not only there's a correctness issue, but also for consistency with the rest of the
RoomProvider
trait's methods, which all return dynamic data about theRoom
.cc @pixlwave