ol.trixnity.user
Room user state, receipts, presence, and permission checks.
Upstream Mapping
This namespace wraps the user-oriented room APIs exposed by Trixnity’s
RoomService.
The public wrappers here cover:
-
room member lookup by id or as keyed flow maps
-
per-user receipt and power-level observation
-
permission checks for invites, bans, kicks, redactions, power changes, and sending events
-
user presence and global account-data queries
Use ol.trixnity.room for room lifecycle and timeline access, and
ol.trixnity.client for client-wide state.
load-members
(load-members client room-id)
(load-members client room-id opts)
Loads room members for room-id and returns a Missionary task.
Supported opts:
| key | description
|-----|-------------
| ::mx/wait | When true, wait for the member load to finish before resolving the task (default true) |
get-by-id
(get-by-id client room-id user-id)
Returns a Missionary flow of the room member for user-id, or nil when unavailable.
get-all-receipts
(get-all-receipts client room-id)
Returns a Missionary flow of per-user receipt flows keyed by user id.
get-receipts-by-id
(get-receipts-by-id client room-id user-id)
Returns a Missionary flow of receipts for user-id in room-id.
get-power-level
(get-power-level client room-id user-id)
Returns a Missionary flow of the current power-level view for user-id.
can-kick-user
(can-kick-user client room-id user-id)
Returns a Missionary flow that reports whether the current client can kick user-id.
can-ban-user
(can-ban-user client room-id user-id)
Returns a Missionary flow that reports whether the current client can ban user-id.
can-unban-user
(can-unban-user client room-id user-id)
Returns a Missionary flow that reports whether the current client can unban user-id.
can-invite-user
(can-invite-user client room-id user-id)
Returns a Missionary flow that reports whether the current client can invite user-id.
can-invite
(can-invite client room-id)
Returns a Missionary flow that reports whether the current client can invite users to room-id.
can-redact-event
(can-redact-event client room-id event-id)
Returns a Missionary flow that reports whether the current client can redact event-id.
can-set-power-level-to-max
(can-set-power-level-to-max client room-id user-id)
Returns a Missionary flow of the maximum power level the current client may assign to user-id.
can-send-event
(can-send-event client room-id event-class-or-content)
Returns a Missionary flow that reports whether the current client can send an event.
event-class-or-content may be either a room-event-content class or a
concrete room-event-content instance.