getLatestMessages

public abstract void getLatestMessages(ConversationType conversationType, String targetId, String channelId, int count, IRongCoreCallback.ResultCallback<List<Message>> callback)

Retrieves the latest messages of a specified conversation.

Since

5.1.1

Parameters

conversationType

The type of the conversation .

targetId

The ID of the conversation. Depending on the conversationType, it could be a user ID, discussion group ID, group ID, or chatroom ID.

channelId

The business identifier of the conversation to which the message belongs.

count

The number of messages to retrieve.

callback

The callback for retrieving the latest messages, sorted in descending order by time. If the number of messages in the conversation is less than the value of the count parameter, all messages in the conversation will be returned.