ol.trixnity.notification
Notification snapshots and notification update flows.
Upstream Mapping
This namespace maps to Trixnity’s NotificationService.
The public wrappers here cover:
-
observing the full notification set in keyed or flat shapes
-
looking up individual notifications and unread counts
-
consuming live notification updates
-
a deprecated bridge for notification extraction from sync responses
Use ol.trixnity.room for room timeline access and
ol.trixnity.client for client lifecycle.
get-notifications
(get-notifications client)
(get-notifications client response-or-opts)
(get-notifications client response opts)
Returns deprecated notification extraction flows.
Prefer get-all, get-by-id, and get-all-updates for the current
notification model.
Supported opts:
| key | description |
|----------------------------------|------------------------------------------------------------------|
| ::mx/decryption-timeout | Decryption timeout for derived timeline events |
| ::mx/sync-response-buffer-size | Number of sync responses buffered while extracting notifications |
deprecated
get-all
(get-all client)
Returns a Missionary flow of the current notifications as a list of inner flows.
get-by-id
(get-by-id client id)
Returns a Missionary flow of the notification with id, or nil when unavailable.
get-count
(get-count client)
(get-count client room-id)
Returns a Missionary flow of notification counts.
With one argument, returns the total count across all rooms.
With room-id, returns the count for that room.
is-unread
(is-unread client room-id)
Returns a Missionary flow that is true when room-id is considered unread.
dismiss
(dismiss client id)
Marks the notification with id as dismissed and returns a Missionary task.