conversationsFlow

abstract fun conversationsFlow(limit: Int, olderThanConversation: Conversation? = null, conversationId: UUID? = null, forceRefresh: Boolean = false): Flow<Result<List<Conversation>>>

Retrieves conversations available to the local participant.

Return

A Flow for observing a List of Conversation search results. Result.Success.data returns the List.

Parameters

limit

The maximum number of results to expect.

olderThanConversation

The comparison conversation which serves as a base for returning older conversations. If null, the query starts from the newest known conversation.

conversationId

The conversation ID if querying for a particular Conversation.

forceRefresh

Forces the requested data to be refreshed over the network when set to true. Otherwise, the requested data is fetched from the local cache and only refreshed over the network if no results are found locally. Default value is false.


abstract fun conversationsFlow(limit: Int, sortedByActivityDescending: Boolean = true, olderThanConversation: Conversation? = null): Flow<Result<List<Conversation>>>

Retrieves n number of conversations from offline cached data sorted by latest activity. This only returns an order based on offline cached data, and may not reflect the real-time state of conversations if the client has not retrieved that activity.

Return

A Flow for observing a List of Conversation search results. Result.Success.data returns the List.

Parameters

limit

The maximum number of conversations to return in the query.

sortedByActivityDescending

The direction based on last activity. Default value is true.

olderThanConversation

The comparison conversation which serves as a base for returning older conversations. If null, the query starts from the newest known conversation.