NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_talk_helper.h
浏览该文件的文档.
1
7#ifndef _NIM_SDK_CPP_TALK_HELPER_H_
8#define _NIM_SDK_CPP_TALK_HELPER_H_
9
10#include <functional>
11#include <list>
12#include <string>
15#include "nim_define_include.h"
21namespace nim {
22
48 std::string push_content_;
52 std::string local_ext_;
56 std::list<std::string> force_push_ids_list_;
62 std::string anti_spam_content_;
64 std::string anti_apam_biz_id_;
80 std::string env_config_;
82 std::string anti_spam_ext;
84 std::string anti_spam_res;
85
88 : resend_flag_(BS_NOT_INIT)
89 , server_history_saved_(BS_NOT_INIT)
90 , roaming_(BS_NOT_INIT)
91 , self_sync_(BS_NOT_INIT)
92 , need_push_(BS_NOT_INIT)
93 , push_need_badge_(BS_NOT_INIT)
94 , push_need_prefix_(BS_NOT_INIT)
95 , routable_(BS_NOT_INIT)
96 , is_blacklisted_(BS_NOT_INIT)
97 , need_offline_(BS_NOT_INIT)
98 , is_force_push_(BS_NOT_INIT)
99 , anti_spam_enable_(BS_NOT_INIT)
100 , anti_apam_biz_id_("")
101 , anti_apam_using_yidun_(1)
102 , client_anti_spam_hitting_(BS_NOT_INIT)
103 , team_msg_need_ack_(BS_NOT_INIT)
104 , team_msg_ack_sent_(BS_NOT_INIT)
105 , team_msg_unread_count_(-1)
106 , is_update_session_(BS_NOT_INIT)
107 , yidun_anti_cheating_("")
108 , env_config_("") {}
109
116 if (server_history_saved_ != BS_NOT_INIT)
117 message[kNIMMsgKeyHistorySave] = server_history_saved_;
118 if (roaming_ != BS_NOT_INIT)
119 message[kNIMMsgKeyMsgRoaming] = roaming_;
120 if (self_sync_ != BS_NOT_INIT)
121 message[kNIMMsgKeyMsgSync] = self_sync_;
122 if (push_need_badge_ != BS_NOT_INIT)
123 message[kNIMMsgKeyPushNeedBadge] = push_need_badge_;
124 if (need_push_ != BS_NOT_INIT)
125 message[kNIMMsgKeyPushEnable] = need_push_;
126 if (push_need_prefix_ != BS_NOT_INIT)
127 message[kNIMMsgKeyPushNeedPrefix] = push_need_prefix_;
128 if (resend_flag_ != BS_NOT_INIT)
129 message[kNIMMsgKeyResendFlag] = resend_flag_;
130 if (routable_ != BS_NOT_INIT)
131 message[kNIMMsgKeyMsgRoutable] = routable_;
132 if (is_blacklisted_ != BS_NOT_INIT)
133 message[kNIMMsgKeyIsBlacklisted] = is_blacklisted_;
134 if (need_offline_ != BS_NOT_INIT)
135 message[kNIMMsgKeySetMsgOffline] = need_offline_;
136 if (!push_payload_.empty())
137 message[kNIMMsgKeyPushPayload] = GetJsonStringWithNoStyled(push_payload_);
138 if (!push_content_.empty())
139 message[kNIMMsgKeyPushContent] = push_content_;
140 if (!server_ext_.empty())
141 message[kNIMMsgKeyServerExt] = GetJsonStringWithNoStyled(server_ext_);
142 if (!local_ext_.empty())
143 message[kNIMMsgKeyLocalExt] = local_ext_;
144 if (is_force_push_ != BS_NOT_INIT)
145 message[kNIMMsgKeyIsForcePush] = is_force_push_ == BS_TRUE ? 1 : 0;
146 if (!force_push_content_.empty())
147 message[kNIMMsgKeyForcePushContent] = force_push_content_;
148 if (!force_push_ids_list_.empty()) {
149 std::string ids_json;
150 StrListToJsonString(force_push_ids_list_, ids_json);
151 message[kNIMMsgKeyForcePushList] = ids_json;
152 }
153 if (anti_spam_enable_ != BS_NOT_INIT)
154 message[kNIMMsgKeyAntiSpamEnable] = anti_spam_enable_ == BS_TRUE ? 1 : 0;
155 if (!anti_spam_content_.empty())
156 message[kNIMMsgKeyAntiSpamContent] = anti_spam_content_;
157 if (!anti_apam_biz_id_.empty())
158 message[kNIMMsgKeyAntiSpamBizId] = anti_apam_biz_id_;
159 message[kNIMMsgKeyAntiSpamUsingYiDun] = anti_apam_using_yidun_;
160 if (client_anti_spam_hitting_ != BS_NOT_INIT)
161 message[kNIMMsgKeyClientAntiSpam] = client_anti_spam_hitting_;
162 if (team_msg_need_ack_ != BS_NOT_INIT)
163 message[kNIMMsgKeyTeamMsgAck] = team_msg_need_ack_;
164 if (team_msg_ack_sent_ != BS_NOT_INIT)
165 message[kNIMMsgKeyLocalKeyTeamMsgAckSent] = team_msg_ack_sent_;
166 if (team_msg_unread_count_ > -1)
167 message[kNIMMsgKeyLocalKeyTeamMsgUnreadCount] = team_msg_unread_count_;
168 if (is_update_session_ != BS_NOT_INIT)
169 message[kNIMMsgKeyIsUpdateSession] = is_update_session_;
170 if (!yidun_anti_cheating_.empty())
171 message[kNIMMsgKeyAntiCheatingYiDun] = yidun_anti_cheating_;
172 if (!anti_spam_ext.empty())
173 message[kNIMMsgKeyAntiSpamExt] = anti_spam_ext;
174 if (!anti_spam_res.empty())
175 message[kNIMMsgKeyAntiSpamRes] = anti_spam_res;
176 if (!env_config_.empty())
177 message[kNIMMsgKeyEnv] = env_config_;
178 }
181 ToJsonValue(value);
182 return value;
183 }
184
191 if (message.isMember(kNIMMsgKeyHistorySave))
192 server_history_saved_ = message[kNIMMsgKeyHistorySave].asInt() == 1 ? BS_TRUE : BS_FALSE;
193 if (message.isMember(kNIMMsgKeyMsgRoaming))
194 roaming_ = message[kNIMMsgKeyMsgRoaming].asInt() == 1 ? BS_TRUE : BS_FALSE;
195 if (message.isMember(kNIMMsgKeyMsgSync))
196 self_sync_ = message[kNIMMsgKeyMsgSync].asInt() == 1 ? BS_TRUE : BS_FALSE;
198 push_need_badge_ = message[kNIMMsgKeyPushNeedBadge].asInt() == 1 ? BS_TRUE : BS_FALSE;
199 if (message.isMember(kNIMMsgKeyPushEnable))
200 need_push_ = message[kNIMMsgKeyPushEnable].asInt() == 1 ? BS_TRUE : BS_FALSE;
202 push_need_prefix_ = message[kNIMMsgKeyPushNeedPrefix].asInt() == 1 ? BS_TRUE : BS_FALSE;
203 if (message.isMember(kNIMMsgKeyResendFlag))
204 resend_flag_ = message[kNIMMsgKeyResendFlag].asInt() == 1 ? BS_TRUE : BS_FALSE;
205 if (message.isMember(kNIMMsgKeyMsgRoutable))
206 routable_ = message[kNIMMsgKeyMsgRoutable].asInt() == 1 ? BS_TRUE : BS_FALSE;
208 is_blacklisted_ = message[kNIMMsgKeyIsBlacklisted].asInt() == 1 ? BS_TRUE : BS_FALSE;
210 need_offline_ = message[kNIMMsgKeySetMsgOffline].asInt() == 1 ? BS_TRUE : BS_FALSE;
211 if (message.isMember(kNIMMsgKeyServerExt) && !message[kNIMMsgKeyServerExt].asString().empty()) {
212 nim::ParseJsonValue(message[kNIMMsgKeyServerExt].asString(), server_ext_);
213 }
214 if (message.isMember(kNIMMsgKeyPushPayload) && !message[kNIMMsgKeyPushPayload].asString().empty()) {
215 nim::ParseJsonValue(message[kNIMMsgKeyPushPayload].asString(), push_payload_);
216 }
217 local_ext_ = message[kNIMMsgKeyLocalExt].asString();
218 push_content_ = message[kNIMMsgKeyPushContent].asString();
219 if (message.isMember(kNIMMsgKeyIsForcePush))
220 is_force_push_ = message[kNIMMsgKeyIsForcePush].asInt() == 1 ? BS_TRUE : BS_FALSE;
221 force_push_content_ = message[kNIMMsgKeyForcePushContent].asString();
222 if (message[kNIMMsgKeyForcePushList].isString()) {
224 if (nim::ParseJsonValue(message[kNIMMsgKeyForcePushList].asString(), values) && values.isArray())
225 JsonStrArrayToList(values, force_push_ids_list_);
226 else {
227 // assert(0);
228 }
229 }
231 anti_spam_enable_ = message[kNIMMsgKeyAntiSpamEnable].asInt() == 1 ? BS_TRUE : BS_FALSE;
232 anti_spam_content_ = message[kNIMMsgKeyAntiSpamContent].asString();
234 client_anti_spam_hitting_ = message[kNIMMsgKeyClientAntiSpam].asInt() == 1 ? BS_TRUE : BS_FALSE;
235 if (message.isMember(kNIMMsgKeyTeamMsgAck))
236 team_msg_need_ack_ = message[kNIMMsgKeyTeamMsgAck].asInt() == 1 ? BS_TRUE : BS_FALSE;
238 team_msg_ack_sent_ = message[kNIMMsgKeyLocalKeyTeamMsgAckSent].asInt() == 1 ? BS_TRUE : BS_FALSE;
240 team_msg_unread_count_ = message[kNIMMsgKeyLocalKeyTeamMsgUnreadCount].asInt();
242 is_update_session_ = message[kNIMMsgKeyIsUpdateSession].asBool() ? BS_TRUE : BS_FALSE;
244 yidun_anti_cheating_ = message[kNIMMsgKeyAntiCheatingYiDun].asString();
245 if (message.isMember(kNIMMsgKeyAntiSpamExt))
246 anti_spam_ext = message[kNIMMsgKeyAntiSpamExt].asString();
247 if (message.isMember(kNIMMsgKeyAntiSpamRes))
248 anti_spam_res = message[kNIMMsgKeyAntiSpamRes].asString();
249 if (message.isMember(kNIMMsgKeyEnv))
250 env_config_ = message[kNIMMsgKeyEnv].asString();
251 }
252};
253
261 uint64_t reply_msg_time_{0};
263 uint64_t reply_msg_id_server_{0};
266
272 uint64_t thread_msg_time_{0};
274 uint64_t thread_msg_id_server_{0};
280 : reply_msg_from_account_("")
281 , reply_msg_to_account_("")
282 , reply_msg_time_(0)
283 , reply_msg_id_server_(0)
284 , reply_msg_id_client_("")
285 , thread_msg_from_account_("")
286 , thread_msg_to_account_("")
287 , thread_msg_time_(0)
288 , thread_msg_id_server_(0)
289 , thread_msg_id_client_("")
290 , deleted_(0) {}
291};
292
295 // 机器人 function
296 std::string function_;
297 // 机器人消息 topic
298 std::string topic_;
299 // 机器人自定义字段
300 std::string custom_content_;
301 // 机器人账号, 单聊忽略, 群聊需指定
302 std::string account_;
303};
304
306public:
311
312public:
316 std::string receiver_accid_;
318 std::string sender_accid_;
320 int64_t timetag_;
322 std::string content_;
326 std::string attach_;
328 std::string client_msg_id_;
334 int32_t sub_type_{0};
335
336public:
338 std::string local_res_path_;
340 std::string local_talk_id_;
342 std::string local_res_id_;
347
348public:
351
352public:
361
364 : rescode_((NIMResCode)0)
365 , feature_(kNIMMessageFeatureDefault)
366 , readonly_sender_client_type_(kNIMClientTypeDefault)
367 , readonly_server_id_(0)
368 , session_type_(kNIMSessionTypeP2P)
369 , timetag_(0)
371 , status_(nim::kNIMMsgLogStatusNone)
372 , sub_status_(nim::kNIMMsgLogSubStatusNone) {}
373
375 IMMessage(const std::string& json_msg)
376 : rescode_((NIMResCode)0)
377 , feature_(kNIMMessageFeatureDefault)
378 , readonly_sender_client_type_(kNIMClientTypeDefault)
379 , readonly_server_id_(0)
380 , session_type_(kNIMSessionTypeP2P)
381 , timetag_(0)
383 , status_(nim::kNIMMsgLogStatusNone)
384 , sub_status_(nim::kNIMMsgLogSubStatusNone) {
386 if (nim::ParseJsonValue(json_msg, values) && values.isObject()) {
387 session_type_ = (NIMSessionType)values[kNIMMsgKeyToType].asUInt();
388 receiver_accid_ = values[kNIMMsgKeyToAccount].asString();
389 sender_accid_ = values[kNIMMsgKeyFromAccount].asString();
390 readonly_sender_client_type_ = (NIMClientType)values[kNIMMsgKeyFromClientType].asUInt();
391 readonly_sender_device_id_ = values[kNIMMsgKeyFromDeviceId].asString();
392 readonly_sender_nickname_ = values[kNIMMsgKeyFromNick].asString();
393 timetag_ = values[kNIMMsgKeyTime].asUInt64();
394
395 type_ = (NIMMessageType)values[kNIMMsgKeyType].asUInt();
396 content_ = values[kNIMMsgKeyBody].asString();
397 attach_ = values[kNIMMsgKeyAttach].asString();
398 client_msg_id_ = values[kNIMMsgKeyClientMsgid].asString();
399 readonly_server_id_ = values[kNIMMsgKeyServerMsgid].asUInt64();
400
401 local_res_path_ = values[kNIMMsgKeyLocalFilePath].asString();
402 local_talk_id_ = values[kNIMMsgKeyLocalTalkId].asString();
403 local_res_id_ = values[kNIMMsgKeyLocalResId].asString();
404 status_ = (NIMMsgLogStatus)values[kNIMMsgKeyLocalLogStatus].asUInt();
405 sub_status_ = (NIMMsgLogSubStatus)values[kNIMMsgKeyLocalLogSubStatus].asUInt();
406
407 msg_setting_.ParseMessageSetting(values);
408
409 // v7.8 <--
410 third_party_callback_ext_ = values[kNIMMsgKeyThirdPartyCBEXT].asString();
411 sub_type_ = values[kNIMMsgKeySubType].asInt();
412 // --> v7.8
413 if (values.isMember(kNIMMsgKeyThreadInfo)) {
424 thread_info_.deleted_ = values[kNIMMsgKeyThreadInfo][kNIMMsgKeyDeleted].asInt();
425 }
426 if (values.isMember(kNIMMsgKeyRobotInfo)) {
431 }
432 }
433 }
434
441 values[kNIMMsgKeyToType] = session_type_;
442 values[kNIMMsgKeyToAccount] = receiver_accid_;
443 values[kNIMMsgKeyFromAccount] = sender_accid_;
444 values[kNIMMsgKeyTime] = timetag_;
445 values[kNIMMsgKeyType] = type_;
446 values[kNIMMsgKeyBody] = content_;
447 values[kNIMMsgKeyAttach] = attach_;
448 values[kNIMMsgKeyClientMsgid] = client_msg_id_;
449 values[kNIMMsgKeyLocalFilePath] = local_res_path_;
450 values[kNIMMsgKeyLocalTalkId] = local_talk_id_;
451 values[kNIMMsgKeyLocalResId] = local_res_id_;
452 values[kNIMMsgKeyLocalLogStatus] = status_;
453 values[kNIMMsgKeyLocalLogSubStatus] = sub_status_;
454 values[kNIMMsgKeySubType] = sub_type_;
455 msg_setting_.ToJsonValue(values);
456
457 if (!use_to_send) {
458 values[kNIMMsgKeyFromClientType] = readonly_sender_client_type_;
459 values[kNIMMsgKeyFromDeviceId] = readonly_sender_device_id_;
460 values[kNIMMsgKeyFromNick] = readonly_sender_nickname_;
461 values[kNIMMsgKeyServerMsgid] = readonly_server_id_;
462 values[kNIMMsgKeyThirdPartyCBEXT] = third_party_callback_ext_;
463 }
474 values[kNIMMsgKeyThreadInfo][kNIMMsgKeyDeleted] = thread_info_.deleted_;
475
477 values[kNIMMsgKeyRobotInfo][kNIMMsgKeyRobotTopic] = robot_info_.topic_;
480 return values;
481 }
482
487 std::string ToJsonString(bool use_to_send) const {
488 nim_cpp_wrapper_util::Json::Value values = ToJsonObject(use_to_send);
489 return GetJsonStringWithNoStyled(values);
490 }
491};
492
496 std::string md5_;
498 int64_t size_;
500 std::string url_;
502 std::string display_name_;
504 std::string file_extension_;
509 : size_(0)
510 , msg_attachment_tag_(kNIMNosDefaultTagIM) {}
511
518 // 以下客户端可以选填
519 if (!display_name_.empty())
520 attach[kNIMFileMsgKeyDisplayName] = display_name_;
521 if (!file_extension_.empty())
522 attach[kNIMFileMsgKeyExt] = file_extension_;
523 if (!md5_.empty())
524 attach[kNIMFileMsgKeyMd5] = md5_;
525 if (size_ > 0)
526 attach[kNIMFileMsgKeySize] = size_;
527 if (!url_.empty())
528 attach[kNIMMsgAttachKeyUrl] = url_;
529 if (!msg_attachment_tag_.empty())
530 attach[kNIMMsgAttachKeyTag] = msg_attachment_tag_;
531 return GetJsonStringWithNoStyled(attach);
532 }
533
538 std::string ToJsonString() const {
540 attach[kNIMFileMsgKeyDisplayName] = display_name_;
541 return ToJsonString(attach);
542 }
543
544 bool operator==(const IMFile& rhs) const {
545 return md5_ == rhs.md5_ && size_ == rhs.size_ && url_ == rhs.url_ && display_name_ == rhs.display_name_ &&
546 file_extension_ == rhs.file_extension_ && msg_attachment_tag_ == rhs.msg_attachment_tag_;
547 }
548};
549
556
559 : width_(0)
560 , height_(0) {}
561
566 std::string ToJsonString() const {
568 attach[kNIMImgMsgKeyWidth] = width_;
569 attach[kNIMImgMsgKeyHeight] = height_;
570
571 return IMFile::ToJsonString(attach); // remove the Visual C++ __super keyword.
572 }
573
574 bool operator==(const IMImage& rhs) const { return IMFile::operator==(rhs) && width_ == rhs.width_ && height_ == rhs.height_; }
575};
576
580 std::string description_;
582 double latitude_;
585
588 : latitude_(0)
589 , longitude_(0) {}
590
595 std::string ToJsonString() const {
597 attach[kNIMLocationMsgKeyTitle] = description_;
598 attach[kNIMLocationMsgKeyLatitude] = latitude_;
599 attach[kNIMLocationMsgKeyLongitude] = longitude_;
600
601 return GetJsonStringWithNoStyled(attach);
602 }
603
604 bool operator==(const IMLocation& rhs) const {
605 return description_ == rhs.description_ && latitude_ == rhs.latitude_ && longitude_ == rhs.longitude_;
606 }
607};
608
613
616 : duration_(0) {}
617
622 std::string ToJsonString() const {
624 attach[kNIMAudioMsgKeyDuration] = duration_;
625
626 return IMFile::ToJsonString(attach); // remove the Visual C++ __super keyword.
627 }
628
629 bool operator==(const IMAudio& rhs) const { return IMFile::operator==(rhs) && duration_ == rhs.duration_; }
630};
631
640
643 : duration_(0)
644 , width_(0)
645 , height_(0) {}
646
651 std::string ToJsonString() const {
653 attach[kNIMVideoMsgKeyWidth] = width_;
654 attach[kNIMVideoMsgKeyHeight] = height_;
655 attach[kNIMVideoMsgKeyDuration] = duration_;
656
657 return IMFile::ToJsonString(attach); // remove the Visual C++ __super keyword.
658 }
659
660 bool operator==(const IMVideo& rhs) const {
661 return IMFile::operator==(rhs) && duration_ == rhs.duration_ && width_ == rhs.width_ && height_ == rhs.height_;
662 }
663};
664
670 std::string robot_accid_;
673
675 std::string related_msg_id_;
677 std::string robot_msg_flag_;
680
683 : out_msg_(false) {}
684
689 std::string ToJsonString() const {
691 attach[kNIMBotRobotMsgKeyRobotID] = robot_accid_;
692 attach[kNIMBotRobotSentMsgKeyParam] = sent_param_;
693 attach[kNIMBotRobotReceivedMsgKeyMsgOut] = out_msg_;
694 attach[kNIMBotRobotReceivedMsgKeyClientMsgID] = related_msg_id_;
695 attach[kNIMBotRobotReceivedMsgKeyRobotMsgFlag] = robot_msg_flag_;
696 attach[kNIMBotRobotReceivedMsgKeyRobotMsgMessage] = robot_msg_content_;
697
698 return GetJsonStringWithNoStyled(attach);
699 }
700
701 bool operator==(const IMBotRobot& rhs) const {
702 return out_msg_ == rhs.out_msg_ && robot_accid_ == rhs.robot_accid_ && sent_param_ == rhs.sent_param_ &&
703 related_msg_id_ == rhs.related_msg_id_ && robot_msg_flag_ == rhs.robot_msg_flag_ && robot_msg_content_ == rhs.robot_msg_content_;
704 }
705};
706
709 std::string body_;
710 int64_t time_;
711 int64_t id_;
712 std::string from_id_;
713};
714
721NIM_SDK_CPPWRAPPER_DLL_API bool ParseMessage(const std::string& msg_json, IMMessage& message);
722
729NIM_SDK_CPPWRAPPER_DLL_API bool ParseReceiveMessage(const std::string& msg_json, IMMessage& message);
730
738
746
747} // namespace nim
748
749#endif //_NIM_SDK_CPP_TALK_HELPER_H_
Represents a JSON value.
Definition: value.h:196
bool isMember(const char *key) const
Definition: json_value.cpp:1241
bool isArray() const
Definition: json_value.cpp:1386
bool isObject() const
Definition: json_value.cpp:1390
bool asBool() const
Definition: json_value.cpp:839
bool empty() const
Return true if empty array, empty object, or null; otherwise, false.
Definition: json_value.cpp:908
Int asInt() const
Definition: json_value.cpp:657
String asString() const
Embedded zeroes are possible.
Definition: json_value.cpp:632
namespace nim
bool ParseMessage(const std::string &msg_json, IMMessage &message)
解析消息
Definition: nim_talk_helper.cpp:11
bool ParseJsonValue(const std::string &content, nim_cpp_wrapper_util::Json::Value &values)
解析JsonString
Definition: nim_json_util.cpp:70
bool StrListToJsonString(const std::list< std::string > &list, std::string &out)
将一个string类型的list组装成一个Json Array
Definition: nim_json_util.cpp:12
bool ParseReceiveMessage(const std::string &msg_json, IMMessage &message)
解析消息
Definition: nim_talk_helper.cpp:20
bool JsonStrArrayToList(const nim_cpp_wrapper_util::Json::Value &array_str, std::list< std::string > &out)
将一个string类型的Json Array解析成一个string类型的list
Definition: nim_json_util.cpp:30
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
NIMClientType
Definition: nim_client_def.h:113
@ kNIMClientTypeDefault
Default, unset
Definition: nim_client_def.h:115
NIM 公共数据类型定义总的包含文件
JSON辅助方法
NIMMsgLogStatus
Definition: nim_msglog_def.h:341
@ kNIMMsgLogStatusNone
默认,不能当查询条件,意义太多
Definition: nim_msglog_def.h:343
NIMMessageType
Definition: nim_msglog_def.h:299
@ kNIMMessageTypeUnknown
未知类型消息,本地使用,发送时勿使用,作为默认值
Definition: nim_msglog_def.h:323
NIMMsgLogSubStatus
Definition: nim_msglog_def.h:463
@ kNIMMsgLogSubStatusNone
默认状态
Definition: nim_msglog_def.h:465
NIMMessageFeature
Definition: nim_msglog_def.h:327
@ kNIMMessageFeatureDefault
默认
Definition: nim_msglog_def.h:329
static const char * kNIMNosDefaultTagIM
string im消息类文件上传tag 如图片、文件、音视频消息等, 可以通过 nim_nos_init_tags修改资源的过期时间
Definition: nim_nos_def.h:203
定义导出宏
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition: nim_sdk_cpp_wrapper.h:38
加载 NIM SDK 的帮助类头文件
BoolStatus
Definition: nim_sdk_util.h:22
@ BS_TRUE
true
Definition: nim_sdk_util.h:28
@ BS_NOT_INIT
未初始化
Definition: nim_sdk_util.h:24
@ BS_FALSE
false
Definition: nim_sdk_util.h:26
NIMSessionType
Definition: nim_session_def.h:16
@ kNIMSessionTypeP2P
个人,即点对点
Definition: nim_session_def.h:18
static const char * kNIMMsgKeyRobotFunction
(可选)string, 机器人 function,后台配置
Definition: nim_talk_def.h:242
static const char * kNIMMsgKeyAttach
string,消息多媒体资源参数,不同类型多媒体参数不同,发送非多媒体消息时不需要填写,如需使用json string,必须为可以解析为json的非格式化的字符串
Definition: nim_talk_def.h:156
static const char * kNIMMsgKeyRobotCustomContent
(可选)string, 机器人消息的自定义字段,后台配置
Definition: nim_talk_def.h:246
static const char * kNIMLocationMsgKeyLatitude
double,纬度
Definition: nim_talk_def.h:403
static const char * kNIMMsgKeyFromDeviceId
string,消息发送方设备id,服务器填写,发送方不需要填写
Definition: nim_talk_def.h:146
static const char * kNIMMsgKeyReplyMsgToAccount
(可选)string,从属thread_info节点,被回复消息的消息接受者,群的话是tid
Definition: nim_talk_def.h:222
static const char * kNIMMsgKeyThreadInfo
(可选) json object,被回复消息的消息发送者
Definition: nim_talk_def.h:218
static const char * kNIMMsgKeyAntiSpamUsingYiDun
int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾
Definition: nim_talk_def.h:203
static const char * kNIMMsgKeyReplyMsgIdClient
(可选)string,从属thread_info节点,被回复消息的消息ID)clientId)
Definition: nim_talk_def.h:228
static const char * kNIMMsgKeyToType
int,会话类型(NIMSessionType)
Definition: nim_talk_def.h:138
static const char * kNIMMsgKeyThreadMsgIdServer
(可选)long,从属thread_info节点,thread消息的消息ID)serverId)
Definition: nim_talk_def.h:236
static const char * kNIMBotRobotReceivedMsgKeyClientMsgID
string,机器人回复时带的字段,表示该条回复相关联的消息ID
Definition: nim_talk_def.h:418
static const char * kNIMMsgKeyIsForcePush
int,(可选)群组消息是否强推,0:不强推, 1:强推,属性只针对群组消息强推列表
Definition: nim_talk_def.h:192
static const char * kNIMMsgKeyLocalTalkId
string,会话id,发送方选填,接收方收到的是消息发送方id
Definition: nim_talk_def.h:269
static const char * kNIMMsgKeyDeleted
Definition: nim_talk_def.h:251
static const char * kNIMMsgKeyAntiCheatingYiDun
(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024
Definition: nim_talk_def.h:209
static const char * kNIMMsgKeyClientAntiSpam
int, (可选) 是否命中客户端反垃圾,命中:1 未命中:0 或者不填写
Definition: nim_talk_def.h:199
static const char * kNIMMsgKeyBody
string,消息正文,长度限制:5000字符
Definition: nim_talk_def.h:154
static const char * kNIMMsgKeyClientMsgid
string,客户端消息id
Definition: nim_talk_def.h:158
static const char * kNIMLocationMsgKeyLongitude
double,经度
Definition: nim_talk_def.h:405
static const char * kNIMMsgKeyType
int,消息类型(NIMMessageType)
Definition: nim_talk_def.h:152
static const char * kNIMMsgKeyRobotAccount
(可选)string, 机器人账号,单聊里不需要填;群聊里需要指定机器人账号,机器人回复的消息里也会带上这字段
Definition: nim_talk_def.h:248
static const char * kNIMBotRobotReceivedMsgKeyRobotMsgFlag
string,机器人回复时带的字段,表示该条回复类型,类型定义可见Demo源码或参考波特开发文档,bot或faq
Definition: nim_talk_def.h:424
static const char * kNIMFileMsgKeyDisplayName
string,用于显示的文件名,发送方选填,默认文件名
Definition: nim_talk_def.h:392
static const char * kNIMMsgKeyEnv
Definition: nim_talk_def.h:259
static const char * kNIMMsgKeyLocalKeyTeamMsgUnreadCount
int, 群消息未读数
Definition: nim_talk_def.h:265
static const char * kNIMMsgKeyLocalExt
string,只维护在本地的扩展字段,必须为可以解析为json的非格式化的字符串
Definition: nim_talk_def.h:277
static const char * kNIMMsgKeyAntiSpamBizId
string, (可选)用户配置的对某些单条消息另外的反垃圾的业务ID
Definition: nim_talk_def.h:201
static const char * kNIMMsgKeyTeamMsgAck
(可选)int, 群消息是否需要已读业务,0:不需要,1:需要
Definition: nim_talk_def.h:205
static const char * kNIMMsgKeyMsgRoutable
int,(可选)该消息是否抄送,0:不支持,1:支持,默认按照app的路由开关
Definition: nim_talk_def.h:182
static const char * kNIMMsgKeyReplyMsgFromAccount
(可选)string,从属thread_info节点,被回复消息的消息发送者
Definition: nim_talk_def.h:220
static const char * kNIMMsgKeyForcePushList
string,(可选)群组消息强推列表,推送指定账号id string array json, 如果推送全员不填
Definition: nim_talk_def.h:188
static const char * kNIMMsgKeyServerExt
string,(可选)自定义扩展字段,必须为可以解析为json的非格式化的字符串,长度限制1024
Definition: nim_talk_def.h:172
static const char * kNIMMsgKeyRobotTopic
(可选)string, 机器人消息的 topic,后台配置
Definition: nim_talk_def.h:244
static const char * kNIMMsgKeySetMsgOffline
int,(可选)消息是否要存离线,0:不需要, 1:需要,默认1
Definition: nim_talk_def.h:186
static const char * kNIMMsgKeyMsgSync
int,(可选)该消息是否支持发送者多端同步,可选,0:不支持,1:支持, 默认1
Definition: nim_talk_def.h:168
static const char * kNIMBotRobotMsgKeyRobotID
string,机器人云信ID
Definition: nim_talk_def.h:414
static const char * kNIMVideoMsgKeyDuration
int,短视频资源时间长度(毫秒),发送方必填
Definition: nim_talk_def.h:373
static const char * kNIMFileMsgKeyMd5
string,资源MD5,发送方选填
Definition: nim_talk_def.h:388
static const char * kNIMMsgKeyFromClientType
int,消息发送方客户端类型(NIMClientType),服务器填写,发送方不需要填写
Definition: nim_talk_def.h:144
static const char * kNIMVideoMsgKeyHeight
int,短视频画面高度,发送方必填
Definition: nim_talk_def.h:377
static const char * kNIMVideoMsgKeyWidth
int,短视频画面宽度,发送方必填
Definition: nim_talk_def.h:375
static const char * kNIMMsgKeyIsBlacklisted
int,(可选)该消息被黑名单拦截 0:未被拦截,1:被拦截
Definition: nim_talk_def.h:184
static const char * kNIMMsgKeyFromAccount
string,消息发送方id,服务器填写,发送方不需要填写
Definition: nim_talk_def.h:142
static const char * kNIMBotRobotReceivedMsgKeyRobotMsgMessage
json object,机器人回复时带的字段,表示该条回复内容,字段内容定义可见Demo源码或参考波特开发文档
Definition: nim_talk_def.h:426
static const char * kNIMMsgKeyIsUpdateSession
(可选)bool, 消息是否需要刷新到session服务,false:否,true:是;只有消息存离线的情况下,才会判断该参数,缺省:true
Definition: nim_talk_def.h:207
static const char * kNIMMsgKeyServerMsgid
long,服务器端消息id
Definition: nim_talk_def.h:160
static const char * kNIMImgMsgKeyHeight
int,图片高度,发送方必填
Definition: nim_talk_def.h:337
static const char * kNIMMsgKeyAntiSpamEnable
int, 是否需要过易盾反垃圾, 0:不需要,1:需要, 默认0
Definition: nim_talk_def.h:194
static const char * kNIMMsgKeyFromNick
string,消息发送方昵称,服务器填写,发送方不需要填写
Definition: nim_talk_def.h:148
static const char * kNIMMsgKeyMsgRoaming
int,(可选)该消息是否支持漫游,可选,0:不支持,1:支持, 默认1
Definition: nim_talk_def.h:166
static const char * kNIMMsgKeyLocalFilePath
string,多媒体消息资源本地绝对路径,SDK本地维护,发送多媒体消息时必填
Definition: nim_talk_def.h:267
static const char * kNIMMsgKeyPushNeedPrefix
int,(可选)推送是否需要前缀,0:不需要,1:需要,默认1
Definition: nim_talk_def.h:180
static const char * kNIMLocationMsgKeyTitle
string,位置信息
Definition: nim_talk_def.h:407
static const char * kNIMMsgKeyReplyMsgIdServer
(可选)long,从属thread_info节点,被回复消息的消息ID)serverId)
Definition: nim_talk_def.h:226
static const char * kNIMMsgKeyThreadMsgTime
(可选)long,从属thread_info节点,thread消息的消息发送时间
Definition: nim_talk_def.h:234
static const char * kNIMMsgKeyResendFlag
int,消息重发标记位,第一次发送0,重发1
Definition: nim_talk_def.h:162
static const char * kNIMFileMsgKeySize
long,资源大小(KB),发送方选填
Definition: nim_talk_def.h:390
static const char * kNIMMsgKeyLocalResId
string,多媒体资源id,发送方选填,接收方收到的是客户端消息id
Definition: nim_talk_def.h:271
static const char * kNIMMsgKeyLocalKeyTeamMsgAckSent
bool 是否已经发送群消息已读回执
Definition: nim_talk_def.h:263
static const char * kNIMMsgKeyThreadMsgIdClient
(可选)string,从属thread_info节点,thread消息的消息ID)clientId)
Definition: nim_talk_def.h:238
static const char * kNIMMsgKeyToAccount
string,消息接收方id,给自己发送消息时填写自己id
Definition: nim_talk_def.h:140
static const char * kNIMMsgKeyLocalLogSubStatus
int,消息二级状态(NIMMsgLogSubStatus)
Definition: nim_talk_def.h:275
static const char * kNIMImgMsgKeyWidth
int,图片宽度,发送方必填
Definition: nim_talk_def.h:335
static const char * kNIMAudioMsgKeyDuration
int,语音资源时间长度(毫秒),发送方必填
Definition: nim_talk_def.h:354
static const char * kNIMMsgKeyPushNeedBadge
int,(可选)推送是否要做消息计数(角标),0:不需要,1:需要,默认1
Definition: nim_talk_def.h:170
static const char * kNIMMsgKeyThreadMsgFromAccount
(可选)string,从属thread_info节点,thread消息的消息发送者
Definition: nim_talk_def.h:230
static const char * kNIMMsgKeyPushEnable
int,(可选)是否需要推送, 0:不需要,1:需要,默认1,aos在收到0是不要模拟本地推送
Definition: nim_talk_def.h:178
static const char * kNIMMsgKeyForcePushContent
string,(可选)群组消息强推文本
Definition: nim_talk_def.h:190
static const char * kNIMBotRobotSentMsgKeyParam
json string,给机器人发送时需要填的字段,字段内容定义可见Demo源码或参考波特开发文档
Definition: nim_talk_def.h:416
static const char * kNIMMsgKeyAntiSpamContent
Definition: nim_talk_def.h:197
static const char * kNIMMsgKeyTime
long,消息时间戳(毫秒)
Definition: nim_talk_def.h:150
static const char * kNIMMsgAttachKeyUrl
long,资源URL, 发送方不需要填写
Definition: nim_talk_def.h:318
static const char * kNIMMsgKeyPushContent
string,(可选)自定义推送文案,长度限制200字节
Definition: nim_talk_def.h:176
static const char * kNIMMsgKeyThreadMsgToAccount
(可选)string,t从属thread_info节点,hread消息的消息接受者,群的话是tid
Definition: nim_talk_def.h:232
static const char * kNIMBotRobotReceivedMsgKeyMsgOut
bool,是否为机器人回复,默认为true
Definition: nim_talk_def.h:420
static const char * kNIMMsgKeyReplyMsgTime
(可选)long,从属thread_info节点,被回复消息的消息发送时间
Definition: nim_talk_def.h:224
static const char * kNIMMsgKeyPushPayload
string,(可选)第三方自定义的推送属性,必须为可以解析为json的非格式化的字符串,长度2048
Definition: nim_talk_def.h:174
static const char * kNIMMsgKeyLocalLogStatus
int,消息状态(NIMMsgLogStatus)
Definition: nim_talk_def.h:273
static const char * kNIMMsgKeyHistorySave
int,(可选)该消息是否存储云端历史,可选,0:不支持,1:支持, 默认1
Definition: nim_talk_def.h:164
static const char * kNIMMsgAttachKeyTag
string, (可选)发送含有附件的消息时使用的场景标签(可参见nos删除策略) ,Audio Image Video File 或者可以被SDK解析到本地文件路径的自定义消息
Definition: nim_talk_def.h:324
static const char * kNIMMsgKeySubType
(可选)int,消息的子类型,客户端定义,服务器透传
Definition: nim_talk_def.h:256
static const char * kNIMMsgKeyAntiSpamExt
(可选)String, 易盾反垃圾扩展字段,限制json,长度限制1024
Definition: nim_talk_def.h:211
static const char * kNIMMsgKeyThirdPartyCBEXT
(可选)string第三方回调回来的自定义扩展字段
Definition: nim_talk_def.h:254
static const char * kNIMFileMsgKeyExt
string,资源扩展名,不包括符号'.',发送方若选填需要保证资源本地路径包含扩展名
Definition: nim_talk_def.h:396
static const char * kNIMMsgKeyAntiSpamRes
String, 易盾反垃圾返回的结果字段
Definition: nim_talk_def.h:213
static const char * kNIMMsgKeyRobotInfo
Definition: nim_talk_def.h:240
NIMResCode
Definition: public_defines.h:21
#define false
Definition: stdbool.h:33
Definition: nim_talk_helper.h:708
std::string body_
Definition: nim_talk_helper.h:709
int64_t id_
Definition: nim_talk_helper.h:711
std::string from_id_
Definition: nim_talk_helper.h:712
int64_t time_
Definition: nim_talk_helper.h:710
语音消息附件
Definition: nim_talk_helper.h:610
int duration_
语音时长
Definition: nim_talk_helper.h:612
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_talk_helper.h:622
IMAudio()
Definition: nim_talk_helper.h:615
bool operator==(const IMAudio &rhs) const
Definition: nim_talk_helper.h:629
波特机器人消息附件
Definition: nim_talk_helper.h:666
std::string related_msg_id_
机器人回复时带的字段,表示该条回复相关联的消息ID
Definition: nim_talk_helper.h:675
nim_cpp_wrapper_util::Json::Value robot_msg_content_
机器人回复时带的字段,表示该条回复内容,字段内容定义可见Demo源码或参考波特开发文档
Definition: nim_talk_helper.h:679
bool out_msg_
是否为机器人回复,是:true,不是:false,默认false
Definition: nim_talk_helper.h:668
bool operator==(const IMBotRobot &rhs) const
Definition: nim_talk_helper.h:701
nim_cpp_wrapper_util::Json::Value sent_param_
给机器人发送时需要填的字段,字段内容定义可见Demo源码或参考波特开发文档
Definition: nim_talk_helper.h:672
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_talk_helper.h:689
IMBotRobot()
Definition: nim_talk_helper.h:682
std::string robot_accid_
机器人云信ID
Definition: nim_talk_helper.h:670
std::string robot_msg_flag_
机器人回复时带的字段,表示该条回复类型,类型定义可见Demo源码或参考波特开发文档
Definition: nim_talk_helper.h:677
文件消息附件
Definition: nim_talk_helper.h:494
std::string md5_
文件内容MD5
Definition: nim_talk_helper.h:496
std::string display_name_
用于显示的文件名称
Definition: nim_talk_helper.h:502
IMFile()
Definition: nim_talk_helper.h:508
std::string url_
上传云端后得到的文件下载地址
Definition: nim_talk_helper.h:500
std::string file_extension_
文件扩展名
Definition: nim_talk_helper.h:504
std::string ToJsonString(nim_cpp_wrapper_util::Json::Value &attach) const
组装Json Value字符串
Definition: nim_talk_helper.h:517
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_talk_helper.h:538
int64_t size_
文件大小
Definition: nim_talk_helper.h:498
std::string msg_attachment_tag_
string, (可选)发送含有附件的消息时使用的场景标签(可参见nos删除策略) Audio Image Video File或者可以被SDK解析到本地文件路径的自定义消息
Definition: nim_talk_helper.h:506
bool operator==(const IMFile &rhs) const
Definition: nim_talk_helper.h:544
图片消息附件
Definition: nim_talk_helper.h:551
bool operator==(const IMImage &rhs) const
Definition: nim_talk_helper.h:574
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_talk_helper.h:566
int height_
图片高度
Definition: nim_talk_helper.h:555
IMImage()
Definition: nim_talk_helper.h:558
int width_
图片宽度
Definition: nim_talk_helper.h:553
位置消息附件
Definition: nim_talk_helper.h:578
double latitude_
位置纬度
Definition: nim_talk_helper.h:582
double longitude_
位置经度
Definition: nim_talk_helper.h:584
bool operator==(const IMLocation &rhs) const
Definition: nim_talk_helper.h:604
std::string description_
位置描述内容
Definition: nim_talk_helper.h:580
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_talk_helper.h:595
IMLocation()
Definition: nim_talk_helper.h:587
Definition: nim_talk_helper.h:305
std::string local_res_path_
媒体文件本地绝对路径(客户端)
Definition: nim_talk_helper.h:338
std::string ToJsonString(bool use_to_send) const
组装Json Value字符串
Definition: nim_talk_helper.h:487
NIMSessionType session_type_
会话类型
Definition: nim_talk_helper.h:314
NIMMessageFeature feature_
消息属性
Definition: nim_talk_helper.h:310
MessageSetting msg_setting_
消息属性设置
Definition: nim_talk_helper.h:330
IMMessage(const std::string &json_msg)
Definition: nim_talk_helper.h:375
std::string readonly_sender_device_id_
发送者客户端设备ID(只读)
Definition: nim_talk_helper.h:356
NIMClientType readonly_sender_client_type_
发送者客户端类型(只读)
Definition: nim_talk_helper.h:354
std::string client_msg_id_
消息ID(客户端)
Definition: nim_talk_helper.h:328
std::string receiver_accid_
接收者ID
Definition: nim_talk_helper.h:316
IMMessage()
Definition: nim_talk_helper.h:363
NIMResCode rescode_
错误码
Definition: nim_talk_helper.h:308
NIMMsgLogStatus status_
消息状态(客户端)
Definition: nim_talk_helper.h:344
std::string local_talk_id_
会话ID(客户端)
Definition: nim_talk_helper.h:340
IMMessageThreadInfo thread_info_
Definition: nim_talk_helper.h:349
nim_cpp_wrapper_util::Json::Value ToJsonObject(bool use_to_send) const
组装Json Object
Definition: nim_talk_helper.h:439
uint64_t readonly_server_id_
消息ID(服务器,只读)
Definition: nim_talk_helper.h:360
std::string readonly_sender_nickname_
发送者昵称(只读)
Definition: nim_talk_helper.h:358
NIMMsgLogSubStatus sub_status_
消息子状态(客户端)
Definition: nim_talk_helper.h:346
NIMMessageType type_
消息类型
Definition: nim_talk_helper.h:324
std::string attach_
消息附件 ,长度限制10000
Definition: nim_talk_helper.h:326
int64_t timetag_
消息时间戳(毫秒)
Definition: nim_talk_helper.h:320
std::string local_res_id_
媒体文件ID(客户端)
Definition: nim_talk_helper.h:342
std::string content_
消息内容,长度限制10000
Definition: nim_talk_helper.h:322
std::string third_party_callback_ext_
第三方回调回来的自定义扩展字段 v7.8添加
Definition: nim_talk_helper.h:332
IMMessageRobotInfo robot_info_
Definition: nim_talk_helper.h:350
std::string sender_accid_
发送者ID
Definition: nim_talk_helper.h:318
机器人消息信息
Definition: nim_talk_helper.h:294
std::string topic_
Definition: nim_talk_helper.h:298
std::string function_
Definition: nim_talk_helper.h:296
std::string account_
Definition: nim_talk_helper.h:302
std::string custom_content_
Definition: nim_talk_helper.h:300
P2P和群组消息
Definition: nim_talk_helper.h:255
std::string thread_msg_from_account_
thread消息的消息发送者
Definition: nim_talk_helper.h:268
uint64_t thread_msg_time_
thread消息的消息发送时间
Definition: nim_talk_helper.h:272
uint64_t thread_msg_id_server_
thread消息的消息ID(serverId)
Definition: nim_talk_helper.h:274
std::string thread_msg_id_client_
thread消息的消息ID(clientId)
Definition: nim_talk_helper.h:276
std::string reply_msg_from_account_
被回复消息的消息发送者
Definition: nim_talk_helper.h:257
std::string thread_msg_to_account_
thread消息的消息接受者,群的话是tid
Definition: nim_talk_helper.h:270
IMMessageThreadInfo()
Definition: nim_talk_helper.h:279
uint64_t reply_msg_time_
被回复消息的消息发送时间
Definition: nim_talk_helper.h:261
uint64_t reply_msg_id_server_
被回复消息的消息ID(serverId)
Definition: nim_talk_helper.h:263
int deleted_
消息是否已经被删除(可能是撤回,也可能是单向删除),查询thread消息历史时可能会有这个字段,大于0表示已经删除(目前撤回和单向删除都是1,未来可能区分)
Definition: nim_talk_helper.h:278
std::string reply_msg_id_client_
被回复消息的消息ID(clientId)
Definition: nim_talk_helper.h:265
std::string reply_msg_to_account_
被回复消息的消息接受者,群的话是tid
Definition: nim_talk_helper.h:259
小视频消息附件
Definition: nim_talk_helper.h:633
std::string ToJsonString() const
组装Json Value字符串
Definition: nim_talk_helper.h:651
int height_
视频画面高度
Definition: nim_talk_helper.h:639
int duration_
视频时长
Definition: nim_talk_helper.h:635
int width_
视频画面宽度
Definition: nim_talk_helper.h:637
IMVideo()
Definition: nim_talk_helper.h:642
bool operator==(const IMVideo &rhs) const
Definition: nim_talk_helper.h:660
消息属性设置
Definition: nim_talk_helper.h:24
nim_cpp_wrapper_util::Json::Value push_payload_
第三方自定义的推送属性,长度2048
Definition: nim_talk_helper.h:46
std::string anti_spam_ext
(可选)String, 易盾反垃圾扩展字段,限制 json,长度限制 1024
Definition: nim_talk_helper.h:82
std::string anti_apam_biz_id_
(可选)用户配置的对某些单条消息另外的反垃圾的业务ID
Definition: nim_talk_helper.h:64
nim_cpp_wrapper_util::Json::Value ToJsonValue() const
Definition: nim_talk_helper.h:179
void ParseMessageSetting(const nim_cpp_wrapper_util::Json::Value &message)
从Json Value解析出消息属性设置
Definition: nim_talk_helper.h:190
BoolStatus team_msg_need_ack_
群消息是否需要已读业务,0:不需要,1:需要
Definition: nim_talk_helper.h:70
std::string force_push_content_
群组消息强推文本
Definition: nim_talk_helper.h:58
BoolStatus push_need_prefix_
需要推送昵称
Definition: nim_talk_helper.h:38
BoolStatus is_force_push_
群组消息强推开关,强推全员设置true并强推列表为空
Definition: nim_talk_helper.h:54
int anti_apam_using_yidun_
int, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾
Definition: nim_talk_helper.h:66
BoolStatus client_anti_spam_hitting_
(可选) 是否命中客户端反垃圾
Definition: nim_talk_helper.h:68
std::string yidun_anti_cheating_
(可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024
Definition: nim_talk_helper.h:78
std::string push_content_
自定义推送文案,长度限制200字节
Definition: nim_talk_helper.h:48
BoolStatus anti_spam_enable_
是否需要过易盾反垃圾
Definition: nim_talk_helper.h:60
std::string anti_spam_res
String, 易盾反垃圾返回的结果字段
Definition: nim_talk_helper.h:84
int team_msg_unread_count_
群消息未读数
Definition: nim_talk_helper.h:74
BoolStatus self_sync_
该消息是否支持发送者多端同步
Definition: nim_talk_helper.h:32
BoolStatus is_update_session_
(可选) 消息是否需要刷新到session服务,0:否,1:是;只有消息存离线的情况下,才会判断该参数,缺省:1
Definition: nim_talk_helper.h:76
BoolStatus routable_
是否要抄送
Definition: nim_talk_helper.h:40
BoolStatus push_need_badge_
是否要做消息计数
Definition: nim_talk_helper.h:36
std::string env_config_
(可选)String, 环境变量,用于指向不同的抄送、第三方回调等配置(于8.0.0添加)
Definition: nim_talk_helper.h:80
BoolStatus roaming_
该消息是否支持漫游
Definition: nim_talk_helper.h:30
void ToJsonValue(nim_cpp_wrapper_util::Json::Value &message) const
组装Json Value字符串
Definition: nim_talk_helper.h:115
std::list< std::string > force_push_ids_list_
群组消息强推列表
Definition: nim_talk_helper.h:56
BoolStatus is_blacklisted_
是否被拉黑
Definition: nim_talk_helper.h:42
BoolStatus server_history_saved_
该消息是否存储云端历史
Definition: nim_talk_helper.h:28
std::string local_ext_
本地扩展字段, 格式不限,长度限制1024
Definition: nim_talk_helper.h:52
std::string anti_spam_content_
(可选)开发者自定义的反垃圾字段,长度限制5000
Definition: nim_talk_helper.h:62
BoolStatus need_offline_
是否支持离线消息
Definition: nim_talk_helper.h:44
BoolStatus need_push_
是否需要推送
Definition: nim_talk_helper.h:34
MessageSetting()
Definition: nim_talk_helper.h:87
BoolStatus resend_flag_
该消息是否为重发状态
Definition: nim_talk_helper.h:26
BoolStatus team_msg_ack_sent_
是否已经发送群消息已读回执
Definition: nim_talk_helper.h:72
nim_cpp_wrapper_util::Json::Value server_ext_
第三方扩展字段, 长度限制1024
Definition: nim_talk_helper.h:50