Class VerificationBase<Events, Arguments>

Typed Event Emitter class which can act as a Base Model for all our model and communication events. This makes it much easier for us to distinguish between events, as we now need to properly type this, so that our events are not stringly-based and prone to silly typos.

Type Parameters

Hierarchy

Constructors

Properties

_done: boolean = false
baseApis: MatrixClient

base matrix api interface

cancelled: boolean = false

the verification channel to send verification messages over. TODO: Channel types

deviceId: string

the device ID that is being verified

doVerification?: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

expectedEvent?: string
promise: null | Promise<void> = null
reject?: ((e: Error | MatrixEvent) => void)

Type declaration

rejectEvent?: ((e: Error) => void)

Type declaration

    • (e: Error): void
    • Parameters

      • e: Error

      Returns void

the key verification request object related to this verification, if any

resolve?: (() => void)

Type declaration

    • (): void
    • Returns void

resolveEvent?: ((e: MatrixEvent) => void)

Type declaration

startEvent: null | MatrixEvent

the m.key.verification.start event that initiated this verification, if any

started?: boolean
transactionTimeoutTimer: null | Timeout = null
userId: string

the user ID that is being verified

Accessors

Methods

  • Parameters

    • type: string
    • uncompletedContent: Record<string, any>

    Returns Promise<void>

  • Begin the key verification

    Returns

    Promise which resolves when the verification has completed.

    Returns Promise<void>

Generated using TypeDoc