mx_send: Send a message to a room

View source: R/messages.R

mx_sendR Documentation

Send a message to a room

Description

Send a message to a room

Usage

mx_send(session, room_id, body, msgtype = "m.text", extra = NULL)

Arguments

session

An "mx_session" object.

room_id

Character. The room ID.

body

Character. The message body.

msgtype

Character. Matrix msgtype, default "m.text".

extra

List or NULL. Extra fields merged into the event content (e.g. formatted body, reply relation).

Value

The event ID of the sent message.

Examples

## Not run: 
mx_send(s, "!abc:matrix.example", "hello world")

## End(Not run)

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