ol.trixnity.client

Matrix client lifecycle, sync control, and client-level state flows.

Upstream Mapping

This namespace maps to client-wide APIs on Trixnity’s de.connect2x.trixnity.client.MatrixClient.

The public wrappers here cover:

  • opening or resuming a client with open

  • sync lifecycle tasks such as start-sync, await-running, stop-sync, and close

  • synchronous current-* accessors paired with relieved Missionary flows for profile, server data, sync state, login state, and startup state

Use ol.trixnity.repo when you want the built-in sqlite4clj-backed repository setup, and ol.trixnity.room, ol.trixnity.user, ol.trixnity.notification, ol.trixnity.verification, and ol.trixnity.key for service-specific APIs.

open

(open config)

Opens or resumes a MatrixClient using the built-in sqlite4clj-backed repository configuration.

If config already contains a client under ::mx/client, the returned task resolves to that client immediately.


start-sync

(start-sync client)

Starts sync for client and returns a Missionary task.


await-running

(await-running client)
(await-running client opts)

Waits for client to reach RUNNING.

Supported opts:

{::mx/timeout java.time.Duration}


stop-sync

(stop-sync client)

Stops sync for client and returns a Missionary task.


close

(close client)

Closes client and tears down its bridge-owned coroutine scope.


current-user-id

(current-user-id client)

Returns the Matrix user id of client as a string.


current-sync-state

(current-sync-state client)

Returns the current sync state as a lower-case keyword.


current-profile

(current-profile client)

Returns the current normalized client profile.


profile

(profile client)

Returns a Missionary flow of the current normalized client profile.


current-server-data

(current-server-data client)

Returns the current normalized server data snapshot.


server-data

(server-data client)

Returns a Missionary flow of normalized server data snapshots.


sync-state

(sync-state client)

Returns a Missionary flow of the current sync state.


current-initial-sync-done

(current-initial-sync-done client)

Returns whether initial sync has completed.


initial-sync-done

(initial-sync-done client)

Returns a Missionary flow of initial-sync completion state.


current-login-state

(current-login-state client)

Returns the current login state as a lower-case keyword or nil.


login-state

(login-state client)

Returns a Missionary flow of lower-case login-state keywords or nil.


current-started

(current-started client)

Returns whether sync has been started for client.


started

(started client)

Returns a Missionary flow of client started state.