matrix-appservice-bridge
    Preparing search index...

    Interface BridgeController

    interface BridgeController {
        onAliasQueried?: (
            alias: string,
            roomId: string,
        ) => PossiblePromise<void>;
        onAliasQuery?: (
            alias: string,
            aliasLocalpart: string,
        ) => PossiblePromise<
            | null
            | void
            | {
                creationOpts?: Record<string, unknown>;
                remote?: RemoteRoom;
                roomId?: string;
            },
        >;
        onEphemeralEvent?: (
            request: Request<TypingEvent | ReadReceiptEvent | PresenceEvent>,
        ) => void;
        onEvent: (request: Request<WeakEvent>, context?: BridgeContext) => void;
        onLog?: (text: string, isError: boolean) => void;
        onUserQuery?: (
            matrixUser: MatrixUser,
        ) => PossiblePromise<
            null
            | void
            | { name?: string; remote?: RemoteUser; url?: string },
        >;
        thirdPartyLookup?: {
            protocols: string[];
            getLocation(
                protocol: string,
                fields: Record<string, string[] | string>,
            ): PossiblePromise<ThirdpartyLocationResponse[]>;
            getProtocol(protocol: string): PossiblePromise<ThirdpartyProtocolResponse>;
            getUser(
                protocol: string,
                fields: Record<string, string[] | string>,
            ): PossiblePromise<ThirdpartyUserResponse[]>;
            parseLocation(
                alias: string,
            ): PossiblePromise<ThirdpartyLocationResponse[]>;
            parseUser(userid: string): PossiblePromise<ThirdpartyLocationResponse[]>;
        };
        userActivityTracker?: UserActivityTracker;
    }
    Index

    Properties

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

    The bridge will invoke this function when a room has been created via 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.

    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.

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

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

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

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

    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.

    thirdPartyLookup?: {
        protocols: string[];
        getLocation(
            protocol: string,
            fields: Record<string, string[] | string>,
        ): PossiblePromise<ThirdpartyLocationResponse[]>;
        getProtocol(protocol: string): PossiblePromise<ThirdpartyProtocolResponse>;
        getUser(
            protocol: string,
            fields: Record<string, string[] | string>,
        ): PossiblePromise<ThirdpartyUserResponse[]>;
        parseLocation(alias: string): PossiblePromise<ThirdpartyLocationResponse[]>;
        parseUser(userid: string): PossiblePromise<ThirdpartyLocationResponse[]>;
    }

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

    userActivityTracker?: UserActivityTracker