JMSGEventDelegate Protocol Reference

Conforms to NSObject
Declared in JMSGEventDelegate.h

Overview

监听通知事件

Other Methods

– onReceiveFriendNotificationEvent:

监听好友相关事件

- (void)onReceiveFriendNotificationEvent:(JMSGFriendNotificationEvent *)event

Parameters

event

好友事件

Availability

3.5.0

Discussion

可监听:加好友、删除好友、好友更新等事件

Declared In

JMSGEventDelegate.h

– onReceiveMessageRetractEvent:

监听消息撤回事件

- (void)onReceiveMessageRetractEvent:(JMSGMessageRetractEvent *)retractEvent

Parameters

retractEvent

下发的通知事件,事件类型请查看 JMSGMessageRetractEvent

Availability

3.2.0

Declared In

JMSGEventDelegate.h

– onReceiveMessageReceiptStatusChangeEvent:

监听消息回执状态变更事件

- (void)onReceiveMessageReceiptStatusChangeEvent:(JMSGMessageReceiptStatusChangeEvent *)receiptEvent

Parameters

receiptEvent

下发的通知事件,事件类型请查看 JMSGMessageReceiptStatusChangeEvent

Availability

3.3.0

Discussion

上层可以通过 receiptEvent 获取相应信息

Declared In

JMSGEventDelegate.h

– onReceiveMessageTransparentEvent:

监听消息透传事件

- (void)onReceiveMessageTransparentEvent:(JMSGMessageTransparentEvent *)transparentEvent

Parameters

transparentEvent

下发的通知事件,事件类型请查看 JMSGMessageTransparentEvent

Availability

3.3.0

Discussion

消息透传的类型:单聊、群聊、设备间透传消息

Declared In

JMSGEventDelegate.h

– onReceiveChatRoomAdminChangeEvents:

聊天室管理员变更通知

- (void)onReceiveChatRoomAdminChangeEvents:(NSArray<__kindofJMSGChatRoomAdminChangeEvent*> *)events

Parameters

events

管理员事件列表

Availability

3.8.0

Discussion

事件具体相关属性请查看 JMSGChatRoomAdminChangeEvent

Declared In

JMSGEventDelegate.h

– onReceiveChatRoomBlacklistChangeEvents:

聊天室黑名单变更通知

- (void)onReceiveChatRoomBlacklistChangeEvents:(NSArray<__kindofJMSGChatRoomBlacklisChangetEvent*> *)events

Parameters

events

黑名单事件列表

Availability

3.8.0

Discussion

事件具体相关属性请查看 JMSGChatRoomBlacklisChangetEvent

Declared In

JMSGEventDelegate.h

– onReceiveChatRoomSilenceEvents:

聊天室禁言通知

- (void)onReceiveChatRoomSilenceEvents:(NSArray<__kindofJMSGChatRoomSilenceEvent*> *)events

Parameters

events

禁言事件列表

Availability

3.8.1

Discussion

事件具体相关属性请查看 JMSGChatRoomSilenceEvent

Declared In

JMSGEventDelegate.h

以下是已经过期方法,请使用提示的新方法

– onReceiveNotificationEvent:

监听通知事件

- (void)onReceiveNotificationEvent:(JMSGNotificationEvent *)event

Parameters

event

下发的通知事件,上层通过 event.eventType 判断具体事件

Discussion

此方法可监听如下事件:

  • 好友事件:加好友、删除好友、好友更新;
  • 当前用户登录状态变更事件:当前登录用户被踢、非客户端修改密码强制登出、登录状态异常、被删除、信息变更通;

方法变更:

之前版本的好友事件、当前登录用户状态变更事件都是通过此方法监听,SDK 从 3.5.0 开始将此方法细分为两个方法.

// 当前用户登录状态变更事件,在 JMSGUserDelegate 类
- (void)onReceiveUserLoginStatusChangeEvent:(JMSGUserLoginStatusChangeEvent *)event;
// 好友相关事件
- (void)onReceiveFriendNotificationEvent:(JMSGFriendNotificationEvent *)event;

注意:此方法已过期,请使用如上所述的两个方法

Declared In

JMSGEventDelegate.h