Package io.rong.imkit
Interface ConversationEventListener
-
- All Implemented Interfaces:
public interface ConversationEventListener
-
-
Method Summary
Modifier and Type Method Description abstract voidonSaveDraft(Conversation.ConversationType type, String targetId, String content)会话里保存草稿时,回调此方法 voidonSaveDraft(ConversationIdentifier conversationIdentifier, String content)abstract voidonClearedMessage(Conversation.ConversationType type, String targetId)根据会话类型,清空某一会话的所有聊天消息记录,回调此方法。 voidonClearedMessage(ConversationIdentifier conversationIdentifier)abstract voidonClearedUnreadStatus(Conversation.ConversationType type, String targetId)清除某会话的所有消息未读状态时,回调此方法。 voidonClearedUnreadStatus(ConversationIdentifier conversationIdentifier)abstract voidonConversationRemoved(Conversation.ConversationType type, String targetId)从会话列表删除某会话时的回调。 abstract voidonOperationFailed(RongIMClient.ErrorCode code)操作失败的回调。 abstract voidonClearConversations(Array<Conversation.ConversationType> conversationTypes)清除某类会话。 voidonMessageReceivedStatusChange(int messageId, Conversation.ConversationType conversationType, String targetId, Message.ReceivedStatus status)voidonChannelChange(String groupId, String channelId, IRongCoreEnum.UltraGroupChannelType type)voidonChannelDelete(String groupId, String channelId)voidonChannelKicked(String groupId, String channelId, String userId)-
-
Method Detail
-
onSaveDraft
abstract void onSaveDraft(Conversation.ConversationType type, String targetId, String content)
会话里保存草稿时,回调此方法
- Parameters:
type- 会话类型targetId- 会话 Idcontent- 草稿内容
-
onSaveDraft
void onSaveDraft(ConversationIdentifier conversationIdentifier, String content)
-
onClearedMessage
abstract void onClearedMessage(Conversation.ConversationType type, String targetId)
根据会话类型,清空某一会话的所有聊天消息记录,回调此方法。
- Parameters:
type- 会话类型。不支持传入 ConversationType.targetId- 目标 Id。根据不同的 conversationType,可能是用户 Id、讨论组 Id、群组 Id。
-
onClearedMessage
void onClearedMessage(ConversationIdentifier conversationIdentifier)
-
onClearedUnreadStatus
abstract void onClearedUnreadStatus(Conversation.ConversationType type, String targetId)
清除某会话的所有消息未读状态时,回调此方法。
- Parameters:
type- 会话类型。不支持传入 ConversationType.targetId- 目标 Id。根据不同的 conversationType,可能是用户 Id、讨论组 Id、群组 Id。
-
onClearedUnreadStatus
void onClearedUnreadStatus(ConversationIdentifier conversationIdentifier)
-
onConversationRemoved
abstract void onConversationRemoved(Conversation.ConversationType type, String targetId)
从会话列表删除某会话时的回调。
- Parameters:
type- 会话类型targetId- 会话 Id
-
onOperationFailed
abstract void onOperationFailed(RongIMClient.ErrorCode code)
操作失败的回调。
-
onClearConversations
abstract void onClearConversations(Array<Conversation.ConversationType> conversationTypes)
清除某类会话。
- Parameters:
conversationTypes- 会话类型。
-
onMessageReceivedStatusChange
void onMessageReceivedStatusChange(int messageId, Conversation.ConversationType conversationType, String targetId, Message.ReceivedStatus status)
- Parameters:
conversationType- 聊天类型targetId- 会话 Idstatus- 状态- Since:
5.2.5 媒体消息发生改变回调
-
onChannelChange
void onChannelChange(String groupId, String channelId, IRongCoreEnum.UltraGroupChannelType type)
-
onChannelDelete
void onChannelDelete(String groupId, String channelId)
-
onChannelKicked
void onChannelKicked(String groupId, String channelId, String userId)
-
-
-
-