send
abstract suspend fun send(text: String, metadata: MessageMetadata? = null, headers: MessageHeaders? = null): Message
Send a message in the chat room.
This method uses the Ably Chat API endpoint for sending messages.
Note: that the suspending function may resolve before OR after the message is received from the realtime channel. This means you may see the message that was just sent in a callback to subscribe
before the function resolves. Spec: CHA-M3
Return
The message was published.
Parameters
text
The text of the message. See SendMessageParams.text
metadata
Optional metadata of the message. See SendMessageParams.metadata
headers
Optional headers of the message. See SendMessageParams.headers