get Chatroom History Messages
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
target Id
The room ID of the chatroom.
record Time
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.