Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BridgeController

Hierarchy

  • BridgeController

Index

Properties

Optional onAliasQueried

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

The bridge will invoke this function when a room has been created via onAliasQuery.

Type declaration

    • (alias: string, roomId: string): PossiblePromise<void>
    • Parameters

      • alias: string
      • roomId: string

      Returns PossiblePromise<void>

Optional onAliasQuery

onAliasQuery: (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.

Type declaration

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

      • alias: string
      • aliasLocalpart: string

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

Optional onEphemeralEvent

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

The bridge will invoke this when a typing, read reciept or presence event is received from the HS. This will only work with the bridgeEncryption configuration set.

Type declaration

onEvent

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

The bridge will invoke when an event has been received from the HS.

Type declaration

Optional onLog

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

Invoked when logging. Defaults to a function which logs to the console.

Type declaration

    • (text: string, isError: boolean): void
    • Parameters

      • text: string
      • isError: boolean

      Returns void

Optional onUserQuery

onUserQuery: (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.

Type declaration

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

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

Optional thirdPartyLookup

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
    • getLocation(protocol: string, fields: Record<string, string | string[]>): PossiblePromise<ThirdpartyLocationResponse[]>
    • Parameters

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

      Returns PossiblePromise<ThirdpartyLocationResponse[]>

  • getProtocol: function
    • getProtocol(protocol: string): PossiblePromise<ThirdpartyProtocolResponse>
    • Parameters

      • protocol: string

      Returns PossiblePromise<ThirdpartyProtocolResponse>

  • getUser: function
    • getUser(protocol: string, fields: Record<string, string | string[]>): PossiblePromise<ThirdpartyUserResponse[]>
    • Parameters

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

      Returns PossiblePromise<ThirdpartyUserResponse[]>

  • parseLocation: function
    • parseLocation(alias: string): PossiblePromise<ThirdpartyLocationResponse[]>
    • Parameters

      • alias: string

      Returns PossiblePromise<ThirdpartyLocationResponse[]>

  • parseUser: function
    • parseUser(userid: string): PossiblePromise<ThirdpartyLocationResponse[]>
    • Parameters

      • userid: string

      Returns PossiblePromise<ThirdpartyLocationResponse[]>

Optional userActivityTracker

userActivityTracker: UserActivityTracker

Generated using TypeDoc