NIMSDK-iOS
载入中...
搜索中...
未找到
NIMChatroomNotificationContent.h
浏览该文件的文档.
1//
2// NIMChatroomNotificationContent.h
3// NIMLib
4//
5// Created by Netease
6// Copyright © 2016年 Netease. All rights reserved.
7//
8
10
11NS_ASSUME_NONNULL_BEGIN
12
13/**
14 * 聊天室操作类型
15 */
16typedef NS_ENUM(NSInteger, NIMChatroomEventType){
17 /**
18 * 成员进入聊天室
19 */
21 /**
22 * 成员离开聊天室
23 */
25 /**
26 * 成员被拉黑
27 */
29 /**
30 * 成员被取消拉黑
31 */
33 /**
34 * 成员被设置禁言
35 */
37 /**
38 * 成员被取消禁言
39 */
41 /**
42 * 设置为管理员
43 */
45 /**
46 * 移除管理员
47 */
49 /**
50 * 设置为固定成员
51 */
53 /**
54 * 取消固定成员
55 */
57 /**
58 * 聊天室被关闭
59 */
61 /**
62 * 聊天室信息更新
63 */
65 /**
66 * 聊天室成员被踢
67 */
69 /**
70 * 聊天室成员被临时禁言
71 */
73 /**
74 * 聊天室成员被解除临时禁言
75 */
77 /**
78 * 聊天室成员主动更新了聊天室的角色信息
79 */
81 /**
82 * 聊天室通用队列变更的通知
83 */
85 /**
86 * 聊天室被禁言了,只有管理员可以发言,其他人都处于禁言状态
87 */
89 /**
90 * 聊天室不在禁言状态
91 */
93 /**
94 * 聊天室通用队列批量变更的通知
95 */
97 /**
98 * 聊天室新增标签禁言,包括的字段是muteDuration、targetTag、operator、opeNick字段
99 */
101 /**
102 * 聊天室移除标签禁言,包括的字段是muteDuration、targetTag、operator、opeNick字段
103 */
105 /**
106 * 聊天室消息撤回,包括的字段是operator、target、msgTime、msgId、ext字段
107 */
109
110 /**
111 * 批量添加聊天室队列元素,包括的字段是ext、opeNick、operator、queueChange字段
112 */
114
115 /**
116 * 批量更新聊天室标签
117 */
119};
120
121/**
122 * 聊天室队列变更类型
123 */
124typedef NS_ENUM(NSInteger, NIMChatroomQueueChangeType){
125 /**
126 * 无效或未知变更类型
127 */
129 /**
130 * 新增元素
131 */
133 /**
134 * 取出元素
135 */
137 /**
138 * 清空元素
139 */
141 /**
142 * 更新元素
143 */
145
146 /**
147 * 批量新增或更新元素
148 */
150};
151
152/**
153 * 聊天室队列批量变更类型
154 */
155typedef NS_ENUM(NSInteger, NIMChatroomQueueBatchChangeType){
156 /**
157 * 无效或未知变更类型
158 */
160 /**
161 * 部分批量清理操作(发生在提交元素的用户掉线时,清理这个用户对应的key)
162 */
164};
165
166/**
167 * 通知事件包含的聊天室成员
168 */
169@interface NIMChatroomNotificationMember : NSObject
170/**
171 * 聊天室成员ID
172 */
173@property (nullable,nonatomic,copy,readonly) NSString *userId;
174/**
175 * 聊天室成员昵称
176 */
177@property (nullable,nonatomic,copy,readonly) NSString *nick;
178
179@end
180
181
182/**
183 * 聊天室通知内容
184 */
186
187/**
188 * 聊天室通知事件类型
189 */
190@property (nonatomic,assign,readonly) NIMChatroomEventType eventType;
191
192/**
193 * 操作者
194 */
195@property (nullable,nonatomic,copy,readonly) NIMChatroomNotificationMember *source;
196
197/**
198 * 被操作者
199 */
200@property (nullable,nonatomic,copy,readonly) NSArray<NIMChatroomNotificationMember *> *targets;
201
202/**
203 * 通知信息
204 */
205@property (nullable,nonatomic,copy,readonly) NSString *notifyExt;
206
207/**
208 * 标签
209 */
210@property (nullable,nonatomic,copy,readonly) NSArray<NSString *> *tags;
211
212/**
213 * 被撤回消息的ID
214 */
215 @property (nullable,nonatomic,copy,readonly) NSString *revokedMessageId;
216
217/**
218 * 被撤回消息的时间
219 */
220@property (nonatomic,readonly) NSTimeInterval revokedMessageTime;
221
222/**
223 * 拓展信息
224 * @discusssion 不同的聊天室通知有不同的扩展信息
225 * NIMChatroomEventTypeAddMuteTemporarily/NIMChatroomEventTypeRemoveMuteTemporarily 类型: 拓展信息为NSNumber,表示临时禁言时长
226 *
227 * NIMChatroomEventTypeEnter 类型: 扩展信息为 NSDictionary , KEY 值为 NIMChatroomEventInfoMutedKey ,NIMChatroomEventInfoTempMutedKey, NIMChatroomEventInfoTempMutedDurationKey
228 *
229 * NIMChatroomEventTypeQueueChange 类型: 扩展信息为 NSDictionary, KEY 值为 NIMChatroomEventInfoQueueChangeTypeKey , NIMChatroomEventInfoQueueChangeItemKey, NIMChatroomEventInfoQueueChangeItemValueKey
230 */
231@property (nullable,nonatomic,copy,readonly) id ext;
232
233@end
234
235/**
236 * 是否是禁言状态
237 */
238extern NSString *const NIMChatroomEventInfoMutedKey;
239
240/**
241 * 是否为临时禁言状态
242 */
243extern NSString *const NIMChatroomEventInfoTempMutedKey;
244
245/**
246 * 临时禁言时长
247 */
248extern NSString *const NIMChatroomEventInfoTempMutedDurationKey;
249
250/**
251 * 聊天室变更类型
252 */
253extern NSString *const NIMChatroomEventInfoQueueChangeTypeKey;
254
255/**
256 * 聊天室变更元素
257 */
258extern NSString *const NIMChatroomEventInfoQueueChangeItemKey;
259
260/**
261 * 聊天室批量变更元素,为包含多个键值对的字典
262 */
263extern NSString *const NIMChatroomEventInfoQueueChangeItemsKey;
264
265
266/**
267 * 聊天室变更元素的值
268 */
270
271
272
273NS_ASSUME_NONNULL_END
NSString *const NIMChatroomEventInfoMutedKey
NIMChatroomEventType
Definition: NIMChatroomNotificationContent.h:16
@ NIMChatroomEventTypeAddCommon
Definition: NIMChatroomNotificationContent.h:52
@ NIMChatroomEventTypeTagTempMuteAdd
Definition: NIMChatroomNotificationContent.h:100
@ NIMChatroomEventTypeAddMute
Definition: NIMChatroomNotificationContent.h:36
@ NIMChatroomEventTypeRoomUnMuted
Definition: NIMChatroomNotificationContent.h:92
@ NIMChatroomEventTypeUpdateTags
Definition: NIMChatroomNotificationContent.h:118
@ NIMChatroomEventTypeKicked
Definition: NIMChatroomNotificationContent.h:68
@ NIMChatroomEventTypeEnter
Definition: NIMChatroomNotificationContent.h:20
@ NIMChatroomEventTypeRoomMuted
Definition: NIMChatroomNotificationContent.h:88
@ NIMChatroomEventTypeInfoUpdated
Definition: NIMChatroomNotificationContent.h:64
@ NIMChatroomEventTypeExit
Definition: NIMChatroomNotificationContent.h:24
@ NIMChatroomEventTypeAddMuteTemporarily
Definition: NIMChatroomNotificationContent.h:72
@ NIMChatroomEventTypeRemoveBlack
Definition: NIMChatroomNotificationContent.h:32
@ NIMChatroomEventTypeRemoveMuteTemporarily
Definition: NIMChatroomNotificationContent.h:76
@ NIMChatroomEventTypeClosed
Definition: NIMChatroomNotificationContent.h:60
@ NIMChatroomEventTypeQueueBatchChange
Definition: NIMChatroomNotificationContent.h:96
@ NIMChatroomEventTypeRemoveMute
Definition: NIMChatroomNotificationContent.h:40
@ NIMChatroomEventTypeAddBlack
Definition: NIMChatroomNotificationContent.h:28
@ NIMChatroomEventTypeAddManager
Definition: NIMChatroomNotificationContent.h:44
@ NIMChatroomEventTypeQueueChange
Definition: NIMChatroomNotificationContent.h:84
@ NIMChatroomEventTypeRemoveManager
Definition: NIMChatroomNotificationContent.h:48
@ NIMChatroomEventTypeMemberUpdateInfo
Definition: NIMChatroomNotificationContent.h:80
@ NIMChatroomEventTypeTagTempMuteRemove
Definition: NIMChatroomNotificationContent.h:104
@ NIMChatroomEventTypeQueueBatchAdd
Definition: NIMChatroomNotificationContent.h:113
@ NIMChatroomEventTypeRecall
Definition: NIMChatroomNotificationContent.h:108
@ NIMChatroomEventTypeRemoveCommon
Definition: NIMChatroomNotificationContent.h:56
NSString *const NIMChatroomEventInfoTempMutedKey
NSString *const NIMChatroomEventInfoQueueChangeItemKey
NSString *const NIMChatroomEventInfoQueueChangeItemValueKey
NSString *const NIMChatroomEventInfoTempMutedDurationKey
NSString *const NIMChatroomEventInfoQueueChangeItemsKey
NIMChatroomQueueChangeType
Definition: NIMChatroomNotificationContent.h:124
@ NIMChatroomQueueChangeTypeUpdate
Definition: NIMChatroomNotificationContent.h:144
@ NIMChatroomQueueChangeTypeOffer
Definition: NIMChatroomNotificationContent.h:132
@ NIMChatroomQueueChangeTypeDrop
Definition: NIMChatroomNotificationContent.h:140
@ NIMChatroomQueueChangeTypeInvalid
Definition: NIMChatroomNotificationContent.h:128
@ NIMChatroomQueueChangeTypeBatchOffer
Definition: NIMChatroomNotificationContent.h:149
@ NIMChatroomQueueChangeTypePoll
Definition: NIMChatroomNotificationContent.h:136
NIMChatroomQueueBatchChangeType
Definition: NIMChatroomNotificationContent.h:155
@ NIMChatroomQueueBatchChangeTypePartClear
Definition: NIMChatroomNotificationContent.h:163
@ NIMChatroomQueueBatchChangeTypeInvalid
Definition: NIMChatroomNotificationContent.h:159
NSString *const NIMChatroomEventInfoQueueChangeTypeKey
Definition: NIMChatroomNotificationContent.h:186
Definition: NIMChatroomNotificationContent.h:170
NSString * nick
Definition: NIMChatroomNotificationContent.h:177
NSString * userId
Definition: NIMChatroomNotificationContent.h:173
Definition: NIMNotificationContent.h:46