Skip to content

Events should have attributes indicating the encryption state. #35

@poljar

Description

@poljar

Every room event might have been an encrypted event, e.g. a client will turn a m.room.encrypted event into a m.room.message event.

Clients need to present some info about this to users. For example an event wasn't encrypted but is posted in an encrypted room, clients might want to decorate such an event with a warning.

Clients will want to show:

  • If an event was encrypted or not
  • If an event is successfully verified or not
  • Let clients record the sender key coming from the m.room.encrypted event, so if the trust state of the device holding the key changes, clients can change the presented verification state of the event.

I suggest we add an optional EncryptionInfo attribute to the events containing something like:

struct EncryptionInfo {
    verified: bool,
    sender_key: String,
    device_id: String,
    session_id: String
}

Most of those attributes will come from the encrypted version of the event, the m.room.encrypted event. The lack of the EncryptionInfo would indicate that the event was unencrypted.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions