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-all-flat

(get-all-flat client)

Returns a Missionary flow of flattened notification snapshots.


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.


dismiss-all

(dismiss-all client)

Dismisses all notifications and returns a Missionary task.


get-all-updates

(get-all-updates client)

Returns a Missionary flow of notification updates.

Upstream notes that this stream should not be buffered because consumed updates are removed from the backing store as new values are requested.