A key verification channel that sends verification events over to_device messages. Generates its own transaction ids.

Implements

Constructors

Properties

client: MatrixClient
deviceId?: string
devices: string[]
transactionId?: string
userId: string

Methods

  • Add all the fields to content needed for sending it over this channel. This is public so verification methods (SAS uses this) can get the exact content that will be sent independent of the used channel, as they need to calculate the hash of it.

    Parameters

    • type: string

      the event type

    • content: Record<string, any>

      the (incomplete) content

    Returns Record<string, any>

    the complete content, as it will be sent.

  • Checks whether the given event type should be allowed to initiate a new VerificationRequest over this channel

    Parameters

    • type: string

      the event type to check

    Returns boolean

    boolean flag

  • Checks whether this event is a well-formed key verification event. This only does checks that don't rely on the current state of a potentially already channel so we can prevent channels being created by invalid events. handleEvent can do more checks and choose to ignore invalid events.

    Parameters

    Returns boolean

    whether the event is valid and should be passed to handleEvent

Generated using TypeDoc