getMessagesByThreadId

fun getMessagesByThreadId(    context: Context,     conversationId: Int,     messagePosition: Int? = null,     pagingConfig: PagingConfig = getDefaultPageConfig()): Flow<PagingData<STWBaseMessage>>

Get the list of messages having the specified conversation Id.

Parameters

context

The application context

conversationId

The conversation identifier


suspend fun getMessagesByThreadId(    context: Context,     conversationId: Int,     @IntRange(from = 0) from: Int,     @IntRange(from = 1) pageSize: Int,     ascOrder: Boolean = false): List<STWBaseMessage>?

Get the list of messages related to the specified conversation Id.

Return

list of messages

Parameters

context

The application context

conversationId

The conversation identifier

from

The offset of the first message starting from it will return message list based on pageSize. Value should be >= 0

pageSize

The max number of message record to be retrieved, 0 will return nothing. Value should be >= 1

ascOrder

false Whether the list is ordered ascending or descending