queryThreadsAsState

fun ChatClient.queryThreadsAsState(request: QueryThreadsRequest, coroutineScope: CoroutineScope = CoroutineScope(DispatcherProvider.IO)): StateFlow<QueryThreadsState?>

Performs ChatClient.queryThreadsResult under the hood and returns QueryThreadsState. The QueryThreadsState cannot be created before connecting the user therefore, the method returns a StateFlow that emits a null when the user has not been connected yet and the new value every time the user changes.

Return

A StateFlow emitting changes in the QueryThreadsState.

Parameters

request

The QueryThreadsRequest used to perform the query threads operation.