getLatestMessages

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

Fetches the latest messages from the specified conversation.

Since

5.0.0

Parameters

conversationType

The type of conversation Conversation.ConversationType.

targetId

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

count

The number of messages to retrieve.

callback

The callback for fetching the latest messages, ordered from newest to oldest. 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.