matrix-appservice-bridge
    Preparing search index...

    Interface BridgeOpts

    interface BridgeOpts {
        bridgeEncryption?: {
            homeserverUrl: string;
            store: ClientEncryptionStore;
        };
        controller: BridgeController;
        disableContext?: boolean;
        disableStores?: boolean;
        domain: string;
        escapeUserIds?: boolean;
        eventStore?: string
        | EventBridgeStore;
        eventValidation?: {
            validateEditSender?: { allowEventOnLookupFail: boolean };
        };
        homeserverUrl: string;
        intentOptions?: { bot?: IntentOpts; clients?: IntentOpts };
        logRequestOutcome?: boolean;
        membershipCache?: MembershipCache;
        networkName?: string;
        onIntentCreate?: (userId: string) => Intent;
        queue?: { perRequest?: boolean; type?: "none" | "single" | "per_room" };
        registration: string | AppServiceRegistration;
        roomLinkValidation?: { rules: Rules };
        roomStore?: string | RoomBridgeStore;
        roomUpgradeOpts?: RoomUpgradeHandlerOpts;
        suppressEcho?: boolean;
        trackUserActivity?: ActivityTrackerOpts;
        userActivityStore?: string | UserActivityStore;
        userStore?: string | UserBridgeStore;
    }
    Index

    Properties

    bridgeEncryption?: { homeserverUrl: string; store: ClientEncryptionStore }
    controller: BridgeController

    The controller logic for the bridge.

    disableContext?: boolean

    true to disable BridgeContext parameters in Bridge.onEvent. Disabling the context makes the bridge do fewer database lookups, but prevents there from being a context parameter.

    Default: false.

    disableStores?: boolean

    True to disable enabling of stores. This should be used by bridges that use their own database instances and do not need any of the included store objects. This implies setting disableContext to True. Default: false.

    domain: string

    The domain part for user_ids and room aliases e.g. "bar" in "@foo:bar".

    escapeUserIds?: boolean

    Escape userIds for non-bot intents with ~escapeUserId Default: true

    eventStore?: string | EventBridgeStore

    The event store instance to use, or the path to the user .db file to load. A database will NOT be created if this is not specified. If disableStores is set, no database will be created or used.

    eventValidation?: { validateEditSender?: { allowEventOnLookupFail: boolean } }

    Type declaration

    • OptionalvalidateEditSender?: { allowEventOnLookupFail: boolean }

      Should we validate that the sender of an edit matches the parent event.

      • allowEventOnLookupFail: boolean

        If the parent edit event could not be found, should the event be rejected.

    homeserverUrl: string

    The base HS url

    intentOptions?: { bot?: IntentOpts; clients?: IntentOpts }

    Options to supply to created Intent instances.

    Type declaration

    • Optionalbot?: IntentOpts

      Options to supply to the bot intent.

    • Optionalclients?: IntentOpts

      Options to supply to the client intents.

    logRequestOutcome?: boolean

    True to enable SUCCESS/FAILED log lines to be sent to onLog. Default: true.

    membershipCache?: MembershipCache

    The membership cache instance to use, which can be manually created by a bridge for greater control over caching. By default a membership cache will be created internally.

    networkName?: string

    A human readable string that will be used when the bridge signals errors to the client. Will not include in error events if ommited.

    onIntentCreate?: (userId: string) => Intent

    The factory function used to create intents.

    queue?: { perRequest?: boolean; type?: "none" | "single" | "per_room" }

    Options for the onEvent queue. When the bridge receives an incoming transaction, it needs to asyncly query the data store for contextual info before calling onEvent. A queue is used to keep the onEvent calls consistent with the arrival order from the incoming transactions.

    Type declaration

    • OptionalperRequest?: boolean

      true to only feed through the next event after the request object in the previous call succeeds or fails. It is vital that you consistently resolve/reject the request if this is 'true', else you will not get any further events from this queue. To aid debugging this, consider setting a delayed listener on the request factory.

      If false, the mere invocation of onEvent is enough to trigger the next event in the queue. You probably want to set this to true if your ~onEvent is performing async operations where ordering matters (e.g. messages).

      Default: false.

    • Optionaltype?: "none" | "single" | "per_room"

      The type of queue to use when feeding through to ~onEvent.

      • If none, events are fed through as soon as contextual info is obtained, which may result in out of order events but stops HOL blocking.
      • If single, onEvent calls will be in order but may be slower due to HOL blocking.
      • If per_room, a queue per room ID is made which reduces the impact of HOL blocking to be scoped to a room.

      Default: single.

    registration: string | AppServiceRegistration

    Application service registration object or path to the registration file.

    roomLinkValidation?: { rules: Rules }
    roomStore?: string | RoomBridgeStore

    The room store instance to use, or the path to the room .db file to load. A database will be created if this is not specified. If disableStores is set, no database will be created or used.

    roomUpgradeOpts?: RoomUpgradeHandlerOpts
    suppressEcho?: boolean

    True to stop receiving onEvent callbacks for events which were sent by a bridge user. Default: true.

    trackUserActivity?: ActivityTrackerOpts
    userActivityStore?: string | UserActivityStore

    The user activity store instance to use, or the path to the user .db file to load. A database will be created if this is not specified. If disableStores is set, no database will be created or used.

    userStore?: string | UserBridgeStore

    The user store instance to use, or the path to the user .db file to load. A database will be created if this is not specified. If disableStores is set, no database will be created or used.