Function mkMatrixEvent

  • Create a MatrixEvent.

    Parameters

    • opts: {
          content: IContent;
          eventId?: string;
          roomId: string;
          sender: string;
          stateKey?: string;
          ts?: number;
          type: string;
          unsigned?: IUnsigned;
      }

      Values for the event.

      • content: IContent

        Content of the event.

      • OptionaleventId?: string

        Optional event_id for the event. If provided will be used as event ID; else an ID is generated.

      • roomId: string

        Room ID of the event.

      • sender: string

        The sender of the event.

      • OptionalstateKey?: string

        Optional state_key for the event. If unspecified, a non-state event is created.

      • Optionalts?: number

        Optional origin_server_ts for the event. If unspecified, the timestamp will be set to 0.

      • type: string

        The type of the event.

      • Optionalunsigned?: IUnsigned

        Optional unsigned data for the event.

    Returns MatrixEvent