mx_send_event: Send an arbitrary room event

View source: R/messages.R

mx_send_eventR Documentation

Send an arbitrary room event

Description

Generic counterpart to mx_send for event types other than m.room.message, such as m.room.encrypted. The content is sent verbatim.

Usage

mx_send_event(session, room_id, event_type, content, txn_id = NULL)

Arguments

session

An "mx_session" object.

room_id

Character. The room ID.

event_type

Character. The event type, e.g. "m.room.encrypted".

content

List. The event content, sent as-is.

txn_id

Character or NULL. Transaction id (generated if NULL).

Value

The event ID of the sent event.

Examples

## Not run: 
mx_send_event(s, "!abc:example", "m.room.encrypted", encrypted_content)

## End(Not run)

mx.api documentation built on Sept. 12, 2026, 1:07 a.m.