getChatroomHistoryMessages

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

Retrieve chatroom historical messages.

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

Parameters

targetId

The room ID of the chatroom.

recordTime

The starting message timestamp in milliseconds.

count

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

order

The retrieval order: Descending, from the latest to the earliest timestamp; Ascending, from the earliest to the latest timestamp. RC_Timestamp_Desc: Descending order, retrieves messages earlier than recordTime. RC_Timestamp_Asc: Ascending order, retrieves messages later than recordTime.

callback

The callback for chatroom historical messages.