NIMSDK-iOS
载入中...
搜索中...
未找到
NIMQChatSystemNotification.h
浏览该文件的文档.
1//
2// NIMQChatSystemNotification.h
3// NIMSDK
4//
5// Created by Netease.
6// Copyright © 2022 Netease. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "NIMQChatDefs.h"
11
13@protocol NIMQChatSystemNotificationAttachment;
14
15NS_ASSUME_NONNULL_BEGIN
16
17typedef NS_ENUM(NSInteger, NIMQChatSystemNotificationStatus) {
18 /**
19 * 正常状态
20 */
22};
23
24/**
25 * 圈组系统消息
26 */
27@interface NIMQChatSystemNotification : NSObject <NSCopying>
28
29/**
30 * 目标
31 */
32@property(nonatomic, assign, readonly) NIMQChatSystemNotificationToType toType;
33
34/**
35 * 消息所属的服务器ID
36 */
37@property(nonatomic, assign, readonly) unsigned long long serverId;
38
39/**
40 * 消息所属的频道ID
41 */
42@property(nonatomic, assign, readonly) unsigned long long channelId;
43
44/**
45 * 消息接收者的账号列表
46 */
47@property(nullable, nonatomic, copy, readonly) NSArray<NSString *> *toAccids;
48
49/**
50 * 消息发送者的accid
51 */
52@property(nullable, nonatomic, copy) NSString *fromAccount;
53
54/**
55 * 消息发送者这的客户端类型
56 */
57@property(nonatomic, assign) NSInteger fromClientType;
58
59/**
60 * 发送设备id
61 */
62@property(nullable, nonatomic, copy) NSString *fromDeviceId;
63
64/**
65 * 发送方昵称
66 */
67@property(nullable, nonatomic, copy) NSString *fromNick;
68
69/**
70 * 消息发送时间
71 */
72@property(nonatomic, assign) NSTimeInterval time;
73
74/**
75 * 消息更新时间,可以更新body/attach/ext三个字段
76 */
77@property(nonatomic, assign) NSTimeInterval updateTime;
78
79
80/**
81 * 系统通知类型
82 */
83@property(nonatomic, assign) NIMQChatSystemNotificationType type;
84
85/**
86 * 客户端生成的消息id, 会用于去重
87 */
88@property(nullable, nonatomic, copy) NSString *messageClientId;
89
90/**
91 * 服务端生成的消息id,全局唯一
92 */
93@property(nonatomic, assign) unsigned long long messageServerID;
94
95/**
96 * 通知内容
97 */
98@property(nullable, nonatomic, copy) NSString *body;
99
100/**
101 * 系统通知附件
102 */
103@property(nullable, nonatomic, copy) id<NIMQChatSystemNotificationAttachment> attach;
104
105/**
106 * 系统通知自定义扩展字段,推荐使用json格式
107 */
108@property(nullable, nonatomic, copy) NSString *ext;
109
110/**
111 * 系统通知状态
112 */
113@property(nonatomic, assign) NSInteger status;
114
115
116/**
117 * 第三方自定义的推送属性,限制json
118 */
119@property(nullable, nonatomic, copy) NSString *pushPayload;
120
121/**
122 * 自定义推送文案
123 */
124@property(nullable, nonatomic, copy) NSString *pushContent;
125
126/**
127 * 自定义系统通知设置
128 * @discussion 可以通过这个字段制定当前通知的各种设置,如是否需要计入推送未读,是否需要带推送前缀等等
129 */
130@property(nullable, nonatomic, copy) NIMQChatSystemNotificationSetting *setting;
131
132/**
133 * 环境变量
134 */
135@property (nullable, nonatomic, copy) NSString *env;
136
137/**
138 * 第三方回调回来的自定义扩展字段
139 */
140@property (nullable, nonatomic, copy) NSString *callbackExt;
141
142@end
143
144NS_ASSUME_NONNULL_END
NIMQChatSystemNotificationType
Definition: NIMQChatDefs.h:68
NIMQChatSystemNotificationToType
Definition: NIMQChatDefs.h:240
NIMQChatSystemNotificationStatus
Definition: NIMQChatSystemNotification.h:17
@ NIMQChatSystemNotificationStatusNormal
Definition: NIMQChatSystemNotification.h:21
Definition: NIMQChatSystemNotification.h:27
NSArray< NSString * > * toAccids
Definition: NIMQChatSystemNotification.h:47
NSString * body
Definition: NIMQChatSystemNotification.h:98
NIMQChatSystemNotificationType type
Definition: NIMQChatSystemNotification.h:83
NSString * pushContent
Definition: NIMQChatSystemNotification.h:124
unsigned long long messageServerID
Definition: NIMQChatSystemNotification.h:93
NSString * fromDeviceId
Definition: NIMQChatSystemNotification.h:62
NSString * callbackExt
Definition: NIMQChatSystemNotification.h:140
NIMQChatSystemNotificationToType toType
Definition: NIMQChatSystemNotification.h:32
NSInteger status
Definition: NIMQChatSystemNotification.h:113
NSString * fromAccount
Definition: NIMQChatSystemNotification.h:52
unsigned long long channelId
Definition: NIMQChatSystemNotification.h:42
NSString * messageClientId
Definition: NIMQChatSystemNotification.h:88
unsigned long long serverId
Definition: NIMQChatSystemNotification.h:37
NSInteger fromClientType
Definition: NIMQChatSystemNotification.h:57
id< NIMQChatSystemNotificationAttachment > attach
Definition: NIMQChatSystemNotification.h:103
NSString * pushPayload
Definition: NIMQChatSystemNotification.h:119
NSString * env
Definition: NIMQChatSystemNotification.h:135
NIMQChatSystemNotificationSetting * setting
Definition: NIMQChatSystemNotification.h:130
NSString * ext
Definition: NIMQChatSystemNotification.h:108
NSTimeInterval time
Definition: NIMQChatSystemNotification.h:72
NSTimeInterval updateTime
Definition: NIMQChatSystemNotification.h:77
NSString * fromNick
Definition: NIMQChatSystemNotification.h:67
Definition: NIMQChatSystemNotificationSetting.h:15