MatrixClientConfiguration

data class MatrixClientConfiguration(var name: String? = null, var storeTimelineEventContentUnencrypted: Boolean = true, var markOwnMessageAsRead: Boolean = false, var autoJoinUpgradedRooms: Boolean = true, var deleteRooms: MatrixClientConfiguration.DeleteRooms = DeleteRooms.WhenNotJoined, var deleteSentOutboxMessageDelay: Duration = 10.seconds, var userPresenceActivityThreshold: Duration = 5.minutes, var enableExternalNotifications: Boolean = false, var cacheExpireDurations: MatrixClientConfiguration.CacheExpireDurations = CacheExpireDurations.default(1.minutes), var syncLoopTimeout: Duration = 30.seconds, var syncErrorDelayConfig: RetryFlowDelayConfig = RetryFlowDelayConfig.sync, var lastRelevantEventFilter: (ClientEvent.RoomEvent<*>) -> Boolean = { it is RoomEvent.MessageEvent<*> }, var syncFilter: Filters = Filters(), var syncOnceFilter: Filters = Filters(presence = Filters.EventFilter(limit = 0)), var httpClientEngine: HttpClientEngine? = null, var httpClientConfig: HttpClientConfig<*>.() -> Unit? = null, var modulesFactories: List<ModuleFactory> = createTrixnityDefaultModuleFactories(), var matrixClientServerApiClientFactory: MatrixClientServerApiClientFactory = object : MatrixClientServerApiClientFactory {}, val experimentalFeatures: MatrixClientConfiguration.ExperimentalFeatures = ExperimentalFeatures())

Constructors

Link copied to clipboard
constructor(name: String? = null, storeTimelineEventContentUnencrypted: Boolean = true, markOwnMessageAsRead: Boolean = false, autoJoinUpgradedRooms: Boolean = true, deleteRooms: MatrixClientConfiguration.DeleteRooms = DeleteRooms.WhenNotJoined, deleteSentOutboxMessageDelay: Duration = 10.seconds, userPresenceActivityThreshold: Duration = 5.minutes, enableExternalNotifications: Boolean = false, cacheExpireDurations: MatrixClientConfiguration.CacheExpireDurations = CacheExpireDurations.default(1.minutes), syncLoopTimeout: Duration = 30.seconds, syncErrorDelayConfig: RetryFlowDelayConfig = RetryFlowDelayConfig.sync, lastRelevantEventFilter: (ClientEvent.RoomEvent<*>) -> Boolean = { it is RoomEvent.MessageEvent<*> }, syncFilter: Filters = Filters(), syncOnceFilter: Filters = Filters(presence = Filters.EventFilter(limit = 0)), httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null, modulesFactories: List<ModuleFactory> = createTrixnityDefaultModuleFactories(), matrixClientServerApiClientFactory: MatrixClientServerApiClientFactory = object : MatrixClientServerApiClientFactory {}, experimentalFeatures: MatrixClientConfiguration.ExperimentalFeatures = ExperimentalFeatures())

Types

Link copied to clipboard
data class CacheExpireDurations(val globalAccountDate: Duration, val deviceKeys: Duration, val crossSigningKeys: Duration, val keyVerificationState: Duration, val mediaCacheMapping: Duration, val olmSession: Duration, val inboundMegolmSession: Duration, val inboundMegolmMessageIndex: Duration, val outboundMegolmSession: Duration, val roomAccountData: Duration, val roomState: Duration, val timelineEvent: Duration, val timelineEventRelation: Duration, val roomUser: Duration, val roomUserReceipts: Duration, val secretKeyRequest: Duration, val roomKeyRequest: Duration, val roomOutboxMessage: Duration, val room: Duration, val presence: Duration, val media: Duration, val notification: Duration)
Link copied to clipboard
sealed interface DeleteRooms

Trixnity will delete rooms based on different conditions:

Link copied to clipboard
data class ExperimentalFeatures(var enableMSC3814: Boolean = false)

Properties

Link copied to clipboard

Automatically join upgraded rooms.

Link copied to clipboard

Specifies how long values are kept in the cache when not used by anyone.

Link copied to clipboard
Link copied to clipboard

Set the delay, after which a sent outbox message is deleted. The delay is checked each time a sync is received.

Link copied to clipboard

Enables storing a queue of notification updates locally to allow using them to update external notifications. To prevent unnecessary stored data, it should not be enabled when not needed and is disabled by default.

Link copied to clipboard
var httpClientConfig: HttpClientConfig<*>.() -> Unit?

Configure the underlying HttpClient.

Link copied to clipboard
var httpClientEngine: HttpClientEngine?

Specify a HttpClientEngine. This should be reused in an application.

Link copied to clipboard

Allows you to customize, which Room.lastRelevantEventId is set.

Link copied to clipboard

Sets the own read marker to the latest messages sent by this client.

Link copied to clipboard

If you need to override standard behavior of API clients, provide a MatrixClientServerApiClientFactory here, and override one or more API clients in de.connect2x.trixnity.clientserverapi.client.MatrixClientServerApiClient.

Link copied to clipboard

Inject and override modules into Trixnity. By default, this is createDefaultTrixnityModules.

Link copied to clipboard
var name: String?

Set a name for this instance. This is used to set a CoroutineName to the CoroutineContext.

Link copied to clipboard
Link copied to clipboard

Set custom delays for the sync loop.

Link copied to clipboard

Set filter for the normal sync.

Link copied to clipboard

The timeout for the normal sync loop.

Link copied to clipboard

Set filter for the single sync (background sync).

Link copied to clipboard

Set the threshold after user presence is marked as unavailable.