buildMessageList

open fun buildMessageList(): List<BaseMessage>

Processes a list of messages to be passed to the view. The return value of this function is delivered to the view through LiveData. If you want to customize the message list to be delivered to the view, you can override this function as shown below.

class CustomChannelViewModel(
    channelUrl: String
) : ChannelViewModel(channelUrl, null) {
    override fun buildMessageList(): List<BaseMessage> {
        return super.buildMessageList().map { message ->
            // customize the message here
            message
        }
    }
}
To provide custom ChannelViewModel to Sendbird UIKit, Check out here for more details.

Return

List of messages to be passed to the view through LiveData. since 3.12.0