Function createRoomWidgetClient

  • Construct a Matrix Client that works in a widget. This client has a subset of features compared to a full client. It uses the widget-api to communicate with matrix. (widget <-> client <-> homeserver)

    Parameters

    • widgetApi: WidgetApi

      The widget api to use for communication.

    • capabilities: ICapabilities

      The capabilities the widget client will request.

    • roomId: string

      The room id the widget is associated with.

    • opts: ICreateClientOpts

      The configuration options for this client. These configuration options will be passed directly to MatrixClient.

    • sendContentLoaded: boolean = true

      Whether to send a content loaded widget action immediately after initial setup. Set to false if the widget uses waitForIFrameLoad=true (in this case the client does not expect a content loaded action at all), or if the the widget wants to send the ContentLoaded action at a later point in time after the initial setup.

    Returns MatrixClient

    A new matrix client with a subset of features.