Class

UnstableAppserviceApis

UnstableAppserviceApis()

Unstable APIs that shouldn't be used in most circumstances for appservices.
Constructor

# new UnstableAppserviceApis()

View Source appservice/UnstableAppserviceApis.ts, line 6

Classes

UnstableAppserviceApis

Methods

# async sendEventWithTimestamp(roomId, eventType, content, ts) → {Promise.<string>}

Sends an event to the given room with a given timestamp.
Parameters:
Name Type Description
roomId string the room ID to send the event to
eventType string the type of event to send
content string the event body to send
ts number The origin_server_ts of the new event

View Source appservice/UnstableAppserviceApis.ts, line 89

resolves to the event ID that represents the event
Promise.<string>

# async sendHistoricalEventBatch(roomId, prevEventId, chunkId, events, stateEventsAtStart)

Send several historical events into a room.
Parameters:
Name Type Description
roomId string The roomID to send to.
prevEventId string The event ID where this batch will be inserted
chunkId string The chunk ID returned from a previous call. Set falsy to start at the beginning.
events Array.<any> A set of event contents for events to be inserted into the room.
stateEventsAtStart Array.<any> A set of state events to be inserted into the room. Defaults to empty.
See:

View Source appservice/UnstableAppserviceApis.ts, line 77

A set of eventIds and the next chunk ID

# async sendStateEventWithTimestamp(roomId, type, stateKey, content, ts) → {Promise.<string>}

Sends a state event to the given room with a given timestamp.
Parameters:
Name Type Description
roomId string the room ID to send the event to
type string the event type to send
stateKey string the state key to send, should not be null
content string the event body to send
ts number The origin_server_ts of the new event

View Source appservice/UnstableAppserviceApis.ts, line 102

resolves to the event ID that represents the message
Promise.<string>