matrix-appservice-bridge
    Preparing search index...

    Class AppServiceRegistration

    Index

    Constructors

    Properties

    pushEphemeral: undefined | boolean

    Experimental Signal to the homeserver that this appservice will accept ephemeral events.

    Methods

    • Parameters

      • regexList: undefined | RegexObj[]
      • sample: string
      • onlyExclusive: boolean

      Returns boolean

    • Add a regex pattern to be registered.

      Parameters

      • type: "users" | "rooms" | "aliases"

        : The type of regex pattern. Must be 'users', 'rooms', or 'aliases'.

      • regex: string

        : The regex pattern.

      • Optionalexclusive: boolean

        : True to reserve the matched namespace.

      Returns void

      If given an invalid type or regex.

    • Get the token the app service will use to communicate with the homeserver.

      Returns null | string

      The token

    • Get the URL which the home server will hit in order to talk to the AS.

      Returns null | string

    • Get the token the homeserver will use to communicate with the app service.

      Returns null | string

      The token

    • Get the ID of the appservice.

      Returns null | string

      The ID

    • Get the key-value output which should be written to a YAML file.

      Returns AppServiceOutput

      If required fields hs_token, as-token, url, sender_localpart are missing.

    • Get the list of protocols that this appservice will serve for third party lookups. Will return null if no protocols have been set.

      Returns null | string[]

      The protocols.

    • Get the desired user_id localpart for the app service itself.

      Returns null | string

      The user_id localpart ("alice" in "@alice:domain")

    • Check if a room alias meets this registration regex.

      Parameters

      • alias: string

        The room alias

      • onlyExclusive: boolean

        True to restrict matching to only exclusive regexes. False to allow exclusive or non-exlusive regexes to match.

      Returns boolean

      True if there is a match.

    • Get whether requests from this AS are rate-limited by the home server.

      Returns boolean

    • Check if a room ID meets this registration regex.

      Parameters

      • roomId: string

        The room ID

      • onlyExclusive: boolean

        True to restrict matching to only exclusive regexes. False to allow exclusive or non-exlusive regexes to match.

      Returns boolean

      True if there is a match.

    • Check if a user_id meets this registration regex.

      Parameters

      • userId: string

        The user ID

      • onlyExclusive: boolean

        True to restrict matching to only exclusive regexes. False to allow exclusive or non-exlusive regexes to match.

      Returns boolean

      True if there is a match.

    • Output this registration to the given file name.

      Parameters

      • filename: string

        The file name to write the yaml to.

      Returns void

      If required fields hs_token, as_token, url are missing.

    • Experimental

      Should the appservice receive ephemeral events. Note this requires a homeserver implementing MSC2409.

      Returns boolean

    • Set the token the app service will use to communicate with the homeserver.

      Parameters

      • token: string

        The token

      Returns void

    • Set the URL which the home server will hit in order to talk to the AS.

      Parameters

      • url: string

        The application service url

      Returns void

    • Set the token the homeserver will use to communicate with the app service.

      Parameters

      • token: string

        The token

      Returns void

    • Set the ID of the appservice; must be unique across the homeserver and never change.

      Parameters

      • id: string

        The ID

      Returns void

    • Set the list of protocols that this appservice will serve for third party lookups.

      Parameters

      • protocols: string[]

        The protocols

      Returns void

    • Set whether requests from this AS are rate-limited by the home server.

      Parameters

      • isRateLimited: boolean

        The flag which is set to true to enable rate rate limiting, false to disable.

      Returns void

    • Set the desired user_id localpart for the app service itself.

      Parameters

      • localpart: string

        The user_id localpart ("alice" in "@alice:domain")

      Returns void

    • Generate a random token.

      Returns string

      A randomly generated token.