NIMSDK-iOS
载入中...
搜索中...
未找到
NIMQChatSendSystemNotificationParam.h
浏览该文件的文档.
1//
2// NIMQChatSendSystemNotificationParam.h
3// NIMSDK
4//
5// Created by Netease.
6// Copyright © 2022 Netease. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
11
12NS_ASSUME_NONNULL_BEGIN
13
14/**
15 * 发送自定义系统通知的参数
16 */
18
19//如果只填了serverId,则发送给serverId下的所有人
20//如果填了serverId+channelId,则发送给serverId+channelId下的所有人
21//如果填了serverId+toAccids,则发送给server下的指定账号列表
22//如果填了serverId+channelId+toAccids,则发送给server下某个channel里的指定账号列表
23//如果只填了toAccids serverId == 0 && channelId == 0,则发送给指定账号列表
24/**
25 * 目标
26 */
27@property(nonatomic, assign, readonly) NIMQChatSystemNotificationToType toType;
28
29/**
30 * 消息所属的服务器ID
31 */
32@property(nonatomic, assign, readonly) unsigned long long serverId;
33
34/**
35 * 消息所属的频道ID
36 */
37@property(nonatomic, assign, readonly) unsigned long long channelId;
38
39/**
40 * 通知接受者账号列表
41 */
42@property(nullable, nonatomic, copy, readonly) NSArray<NSString *> *toAccids;
43
44/**
45 * 通知内容
46 */
47@property(nullable, nonatomic, copy) NSString *body;
48
49/**
50 * 消息附件
51 */
52@property(nullable, nonatomic, copy) NSDictionary *attach;
53
54/**
55 * 消息自定义扩展字段,推荐使用json格式
56 */
57@property(nullable, nonatomic, copy) NSString *ext;
58
59/**
60 * 第三方自定义的推送属性,限制json
61 */
62@property(nonatomic, copy) NSString *pushPayload;
63
64/**
65 * 自定义推送文案
66 */
67@property(nullable, nonatomic, copy) NSString *pushContent;
68
69/**
70 * 环境变量
71 */
72@property (nullable, nonatomic, copy) NSString *env;
73
74/**
75 * 自定义系统通知设置
76 * @discussion 可以通过这个字段制定当前通知的各种设置,如是否需要计入推送未读,是否需要带推送前缀等等
77 */
78@property(nullable, nonatomic, copy) NIMQChatSystemNotificationSetting *setting;
79
80- (instancetype)initWithServerId:(unsigned long long)serverId;
81
82- (instancetype)initWithServerId:(unsigned long long)serverId
83 channelId:(unsigned long long)channelId;
84
85- (instancetype)initWithServerId:(unsigned long long)serverId
86 toAccids:(NSArray<NSString *> *)toAccids;
87
88- (instancetype)initWithServerId:(unsigned long long)serverId
89 channelId:(unsigned long long)channelId
90 toAccids:(NSArray<NSString *> *)toAccids;
91
92- (instancetype)initWithAccids:(NSArray<NSString *> *)toAccids;
93
95
96@end
97
98NS_ASSUME_NONNULL_END
NIMQChatSystemNotificationToType
Definition: NIMQChatDefs.h:240
Definition: NIMQChatSendSystemNotificationParam.h:18
unsigned long long channelId
Definition: NIMQChatSendSystemNotificationParam.h:37
NSArray< NSString * > * toAccids
Definition: NIMQChatSendSystemNotificationParam.h:42
NIMQChatSystemNotificationToType toType
Definition: NIMQChatSendSystemNotificationParam.h:27
NSString * body
Definition: NIMQChatSendSystemNotificationParam.h:47
NSString * pushContent
Definition: NIMQChatSendSystemNotificationParam.h:67
NSString * ext
Definition: NIMQChatSendSystemNotificationParam.h:57
NIMQChatSystemNotification * toQChatSystemNotification()
NSString * env
Definition: NIMQChatSendSystemNotificationParam.h:72
NIMQChatSystemNotificationSetting * setting
Definition: NIMQChatSendSystemNotificationParam.h:78
unsigned long long serverId
Definition: NIMQChatSendSystemNotificationParam.h:32
NSDictionary * attach
Definition: NIMQChatSendSystemNotificationParam.h:52
NSString * pushPayload
Definition: NIMQChatSendSystemNotificationParam.h:62
Definition: NIMQChatSystemNotification.h:27
Definition: NIMQChatSystemNotificationSetting.h:15