按时间戳删除消息
会话
清除时间点,该时间之前的消息将被清除
根据时间戳删除指定单个会话中早于(含)指定时间戳的所有消息。
按时间戳删除消息示例:
const conversation = { conversationType: RongIMLib.ConversationType.PRIVATE, targetId: 'targetId',}const timestamp = 1632728573423;const clearRes = await RongIMLib.clearHistoryMessages(conversation, timestamp);console.info('清除消息结果:', clearRes); Copy
const conversation = { conversationType: RongIMLib.ConversationType.PRIVATE, targetId: 'targetId',}const timestamp = 1632728573423;const clearRes = await RongIMLib.clearHistoryMessages(conversation, timestamp);console.info('清除消息结果:', clearRes);
按时间戳删除消息