7#ifndef _NIM_SDK_CPP_TALK_HELPER_H_
8#define _NIM_SDK_CPP_TALK_HELPER_H_
100 , anti_apam_biz_id_(
"")
101 , anti_apam_using_yidun_(1)
105 , team_msg_unread_count_(-1)
107 , yidun_anti_cheating_(
"")
136 if (!push_payload_.
empty())
138 if (!push_content_.empty())
140 if (!server_ext_.
empty())
142 if (!local_ext_.empty())
146 if (!force_push_content_.empty())
148 if (!force_push_ids_list_.empty()) {
149 std::string ids_json;
155 if (!anti_spam_content_.empty())
157 if (!anti_apam_biz_id_.empty())
166 if (team_msg_unread_count_ > -1)
170 if (!yidun_anti_cheating_.empty())
172 if (!anti_spam_ext.empty())
174 if (!anti_spam_res.empty())
176 if (!env_config_.empty())
261 uint64_t reply_msg_time_{0};
263 uint64_t reply_msg_id_server_{0};
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_(
"")
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_(
"")
334 int32_t sub_type_{0};
367 , readonly_server_id_(0)
379 , readonly_server_id_(0)
519 if (!display_name_.empty())
521 if (!file_extension_.empty())
529 if (!msg_attachment_tag_.empty())
541 return ToJsonString(attach);
571 return IMFile::ToJsonString(attach);
626 return IMFile::ToJsonString(attach);
657 return IMFile::ToJsonString(attach);
661 return IMFile::operator==(rhs) && duration_ == rhs.
duration_ && width_ == rhs.
width_ && height_ == rhs.
height_;
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
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
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
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