Interface BridgeController

Hierarchy

  • BridgeController

Properties

onAliasQueried?: ((alias: string, roomId: string) => PossiblePromise<void>)

Type declaration

    • (alias: string, roomId: string): PossiblePromise<void>
    • The bridge will invoke this function when a room has been created via onAliasQuery.

      Parameters

      • alias: string
      • roomId: string

      Returns PossiblePromise<void>

onAliasQuery?: ((alias: string, aliasLocalpart: string) => PossiblePromise<null | void | { creationOpts?: Record<string, unknown>; remote?: RemoteRoom; roomId?: string }>)

Type declaration

    • (alias: string, aliasLocalpart: string): PossiblePromise<null | void | { creationOpts?: Record<string, unknown>; remote?: RemoteRoom; roomId?: string }>
    • The bridge will invoke this function when queried via onAliasQuery. If not supplied, no rooms will be provisioned on alias queries. Provisioned rooms will automatically be stored in the associated roomStore.

      Parameters

      • alias: string
      • aliasLocalpart: string

      Returns PossiblePromise<null | void | { creationOpts?: Record<string, unknown>; remote?: RemoteRoom; roomId?: string }>

onEphemeralEvent?: ((request: Request<TypingEvent | ReadReceiptEvent | PresenceEvent>) => void)

Type declaration

onEvent: ((request: Request<WeakEvent>, context?: BridgeContext) => void)

Type declaration

onLog?: ((text: string, isError: boolean) => void)

Type declaration

    • (text: string, isError: boolean): void
    • Invoked when logging. Defaults to a function which logs to the console.

      Parameters

      • text: string
      • isError: boolean

      Returns void

onUserQuery?: ((matrixUser: MatrixUser) => PossiblePromise<null | void | { name?: string; remote?: RemoteUser; url?: string }>)

Type declaration

    • (matrixUser: MatrixUser): PossiblePromise<null | void | { name?: string; remote?: RemoteUser; url?: string }>
    • The bridge will invoke this function when queried via onUserQuery. If not supplied, no users will be provisioned on user queries. Provisioned users will automatically be stored in the associated userStore.

      Parameters

      Returns PossiblePromise<null | void | { name?: string; remote?: RemoteUser; url?: string }>

thirdPartyLookup?: { protocols: string[]; getLocation?: any; getProtocol?: any; getUser?: any; parseLocation?: any; parseUser?: any }

If supplied, the bridge will respond to third-party entity lookups using the contained helper functions.

Type declaration

  • protocols: string[]
  • getLocation?:function
    • Parameters

      • protocol: string
      • fields: Record<string, string | string[]>

      Returns PossiblePromise<ThirdpartyLocationResponse[]>

  • getProtocol?:function
    • Parameters

      • protocol: string

      Returns PossiblePromise<ThirdpartyProtocolResponse>

  • getUser?:function
    • Parameters

      • protocol: string
      • fields: Record<string, string | string[]>

      Returns PossiblePromise<ThirdpartyUserResponse[]>

  • parseLocation?:function
    • Parameters

      • alias: string

      Returns PossiblePromise<ThirdpartyLocationResponse[]>

  • parseUser?:function
    • Parameters

      • userid: string

      Returns PossiblePromise<ThirdpartyLocationResponse[]>

userActivityTracker?: UserActivityTracker

Generated using TypeDoc