ol.trixnity.room.message

Helpers for constructing normalized room message payloads.

This namespace provides small builders for the message-spec maps accepted by ol.trixnity.room/send-message.

The helpers here cover the common message-spec cases:

  • text builds a normalized text message payload

  • emote builds a normalized emote message payload

  • audio, image, and file build normalized attachment payloads

  • reply-to attaches reply metadata from a normalized event map

Use ol.trixnity.event to inspect the events you are replying to.

text

(text body)
(text body opts)

Builds a text message-spec map understood by ol.trixnity.room/send-message.


emote

(emote body)
(emote body opts)

Builds an emote message-spec map understood by ol.trixnity.room/send-message.


audio

(audio source-path)
(audio source-path opts)

Builds an audio message-spec map understood by ol.trixnity.room/send-message.


image

(image source-path)
(image source-path opts)

Builds an image message-spec map understood by ol.trixnity.room/send-message.


file

(file source-path)
(file source-path opts)

Builds a file message-spec map understood by ol.trixnity.room/send-message.


reply-to

(reply-to message ev)

Associates reply metadata from normalized event ev onto message.

When ev already carries relation metadata, that relation is copied into the reply target so upstream threading semantics are preserved.