matrix-js-sdk
99b3cf22 - Introduce `Room.hasEncryptionStateEvent` (#4030)

Comment changes are shownComment changes are hidden
Commit
1 year ago
Introduce `Room.hasEncryptionStateEvent` (#4030) ... and replace a lot of calls to `MatrixClient.isRoomEncrypted` with it. This is a lesser check (since it can be tricked by servers withholding the state event), but for most cases it is sufficient. At the end of the day, if the server witholds the state, the room is pretty much bricked anyway. The one thing we *mustn't* do is allow users to send *unencrypted* events to the room.
Author
Parents
  • spec/unit
    • File
      matrix-client.spec.ts
  • src
    • File
      client.ts
    • models
      • File
        room.ts
    • File
      sliding-sync-sdk.ts
    • File
      sync.ts