getChatroomHistoryMessages

public abstract void getChatroomHistoryMessages(String targetId, long recordTime, int count, RongIMClient.TimestampOrder order, IRongCallback.IChatRoomHistoryMessageCallback callback)

Retrieves chatroom historical messages.

Fetches historical messages of the chatroom from the server. If the specified time is 0, it starts pulling from the first stored message.Note: The chatroom message cloud storage feature must be enabled first.

Parameters

targetId

Conversation ID.

recordTime

The starting message send timestamp in milliseconds.

count

The number of messages to retrieve, 0 < count <= 200.

order

Pull order: descending, from the latest to the earliest; ascending, from the earliest to the latest.

callback

Callback for chatroom historical messages.