Class VerificationBase<Events, Arguments>

Deprecated

Avoid referencing this class directly; instead use Verifier.

Type Parameters

Hierarchy

Implements

Constructors

  • Base class for verification methods.

    Once a verifier object is created, the verification can be started by calling the verify() method, which will return a promise that will resolve when the verification is completed, or reject if it could not complete.

    Subclasses must have a NAME class property.

    Type Parameters

    Parameters

    • channel: IVerificationChannel

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

    • baseApis: MatrixClient

      base matrix api interface

    • userId: string

      the user ID that is being verified

    • deviceId: string

      the device ID that is being verified

    • startEvent: null | MatrixEvent

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

    • request: VerificationRequest<IVerificationChannel>

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

    Returns VerificationBase<Events, Arguments>

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

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

Type declaration

rejectEvent?: ((e) => void)

Type declaration

    • (e): void
    • Parameters

      Returns void

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

resolve?: (() => void)

Type declaration

    • (): void
    • Returns void

resolveEvent?: ((e) => void)

Type declaration

startEvent: null | MatrixEvent

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

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

the user ID that is being verified

Accessors

  • get hasBeenCancelled(): boolean
  • Returns true if the verification has been cancelled, either by us or the other side.

    Returns boolean

Methods

  • Adds the listener function to the end of the listeners array for the event named event.

    No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added, and called, multiple times.

    By default, event listeners are invoked in the order they are added. The prependListener method can be used as an alternative to add the event listener to the beginning of the listeners array.

    Type Parameters

    Parameters

    Returns VerificationBase<Events, Arguments>

    a reference to the EventEmitter, so that calls can be chained.

Generated using TypeDoc