11#ifndef __NIM_QCHAT_MESSAGE_CPP_DEF_H__
12#define __NIM_QCHAT_MESSAGE_CPP_DEF_H__
25 virtual void SetRawData(
const std::string& raw_data){};
26 virtual std::string GetRawData()
const {
return ""; };
27 virtual bool IsFileBased()
const {
return false; };
36 c_param.msg_attach =
const_cast<char*
>(msg_attach.c_str());
39 void SetRawData(
const std::string& raw_data) { msg_attach = raw_data; };
40 std::string GetRawData()
const override {
return msg_attach; }
41 std::string msg_attach;
50 file_path = c_param.file_path ? c_param.file_path :
"";
51 download_url = c_param.url ? c_param.url :
"";
52 hash = c_param.md5 ? c_param.md5 :
"";
53 extension = c_param.ext ? c_param.ext :
"";
54 name = c_param.name ? c_param.name :
"";
58 param.file_path =
const_cast<char*
>(file_path.c_str());
59 param.url =
const_cast<char*
>(download_url.c_str());
60 param.md5 =
const_cast<char*
>(hash.c_str());
61 param.ext =
const_cast<char*
>(extension.c_str());
62 param.name =
const_cast<char*
>(name.c_str());
65 void SetRawData(
const std::string& raw_data) {
68 if (values.
isMember(kNIMQChatFilePath))
69 file_path = values[kNIMQChatFilePath].
asString();
71 hash = values[kNIMQChatMD5].
asString();
73 name = values[kNIMQChatName].
asString();
75 download_url = values[kNIMQChatURL].
asString();
77 extension = values[kNIMQChatExt].
asString();
80 std::string GetRawData()
const override {
82 ProcessFileFields(values);
86 values[kNIMQChatFilePath] = file_path;
87 values[kNIMQChatURL] = download_url;
88 values[kNIMQChatMD5] = hash;
89 values[kNIMQChatExt] = extension;
90 values[kNIMQChatName] = name;
92 bool IsFileBased()
const override {
return true; }
95 std::string file_path;
97 std::string download_url;
98 std::string extension;
106 file_path = c_param.file_path ? c_param.file_path :
"";
107 width = c_param.width;
108 height = c_param.height;
109 download_url = c_param.url ? c_param.url :
"";
110 hash = c_param.md5 ? c_param.md5 :
"";
111 extension = c_param.ext ? c_param.ext :
"";
112 name = c_param.name ? c_param.name :
"";
116 param.file_path =
const_cast<char*
>(file_path.c_str());
118 param.height = height;
119 param.url =
const_cast<char*
>(download_url.c_str());
120 param.md5 =
const_cast<char*
>(hash.c_str());
121 param.ext =
const_cast<char*
>(extension.c_str());
122 param.name =
const_cast<char*
>(name.c_str());
125 void SetRawData(
const std::string& raw_data) {
126 QChatFileAttach::SetRawData(raw_data);
129 if (values.
isMember(kNIMQChatWidth))
130 width = values[kNIMQChatWidth].asInt();
131 if (values.
isMember(kNIMQChatHeight))
132 height = values[kNIMQChatHeight].asInt();
135 std::string GetRawData()
const override {
137 ProcessFileFields(values);
138 values[kNIMQChatWidth] = width;
139 values[kNIMQChatHeight] = height;
152 file_path = c_param.file_path ? c_param.file_path :
"";
153 duration = c_param.duration;
154 download_url = c_param.url ? c_param.url :
"";
155 hash = c_param.md5 ? c_param.md5 :
"";
156 extension = c_param.ext ? c_param.ext :
"";
157 name = c_param.name ? c_param.name :
"";
161 param.file_path =
const_cast<char*
>(file_path.c_str());
162 param.duration = duration;
163 param.url =
const_cast<char*
>(download_url.c_str());
164 param.md5 =
const_cast<char*
>(hash.c_str());
165 param.ext =
const_cast<char*
>(extension.c_str());
166 param.name =
const_cast<char*
>(name.c_str());
169 void SetRawData(
const std::string& raw_data) {
172 if (values.
isMember(kNIMQChatDuration))
173 duration = values[kNIMQChatDuration].asInt();
176 std::string GetRawData()
const override {
178 ProcessFileFields(values);
179 values[kNIMQChatDuration] = duration;
183 uint64_t duration = 0;
191 file_path = c_param.file_path ? c_param.file_path :
"";
192 duration = c_param.duration;
193 width = c_param.width;
194 height = c_param.height;
195 download_url = c_param.url ? c_param.url :
"";
196 hash = c_param.md5 ? c_param.md5 :
"";
197 extension = c_param.ext ? c_param.ext :
"";
198 name = c_param.name ? c_param.name :
"";
202 param.file_path =
const_cast<char*
>(file_path.c_str());
203 param.duration = duration;
205 param.height = height;
206 param.url =
const_cast<char*
>(download_url.c_str());
207 param.md5 =
const_cast<char*
>(hash.c_str());
208 param.ext =
const_cast<char*
>(extension.c_str());
209 param.name =
const_cast<char*
>(name.c_str());
212 void SetRawData(
const std::string& raw_data) {
215 if (values.
isMember(kNIMQChatDuration))
216 duration = values[kNIMQChatDuration].asInt();
217 if (values.
isMember(kNIMQChatWidth))
218 width = values[kNIMQChatWidth].asInt();
219 if (values.
isMember(kNIMQChatHeight))
220 height = values[kNIMQChatHeight].asInt();
223 std::string GetRawData()
const override {
225 ProcessFileFields(values);
226 values[kNIMQChatDuration] = duration;
227 values[kNIMQChatWidth] = width;
228 values[kNIMQChatHeight] = height;
232 uint64_t duration = 0;
242 latitude = c_param.latitude;
243 longitude = c_param.longitude;
244 title = c_param.title ? c_param.title :
"";
248 param.latitude = latitude;
249 param.longitude = longitude;
250 param.title =
const_cast<char*
>(title.c_str());
253 void SetRawData(
const std::string& raw_data) {
256 if (values.
isMember(kNIMQChatLatitude))
257 latitude = values[kNIMQChatLatitude].asDouble();
258 if (values.
isMember(kNIMQChatLongitude))
259 longitude = values[kNIMQChatLongitude].asDouble();
260 if (values.
isMember(kNIMQChatTitle))
261 title = values[kNIMQChatTitle].
asString();
264 std::string GetRawData()
const override {
266 values[kNIMQChatLatitude] = latitude;
267 values[kNIMQChatLongitude] = longitude;
268 values[kNIMQChatTitle] = title;
273 double longitude = 0;
282 data = c_param.data ? c_param.data :
"";
287 param.data =
const_cast<char*
>(data.c_str());
290 void SetRawData(
const std::string& raw_data) {
294 id = values[kNIMQChatID].asInt();
296 data = values[kNIMQChatData].
asString();
299 std::string GetRawData()
const override {
301 values[kNIMQChatID] = id;
302 values[kNIMQChatData] = data;
315 data = c_param.data ? c_param.data :
"";
320 param.data =
const_cast<char*
>(data.c_str());
323 void SetRawData(
const std::string& raw_data) {
327 type = values[kNIMQChatType].asInt();
329 data = values[kNIMQChatData].
asString();
332 std::string GetRawData()
const override {
334 values[kNIMQChatType] = type;
335 values[kNIMQChatData] = data;
358 std::string operator_id;
359 uint32_t operator_client_type;
366 env = c_param.
env ? c_param.
env :
"";
373 c_param.
postscript =
const_cast<char*
>(postscript.c_str());
374 c_param.
extension =
const_cast<char*
>(extension.c_str());
375 c_param.
push_content =
const_cast<char*
>(push_content.c_str());
376 c_param.
push_payload =
const_cast<char*
>(push_payload.c_str());
377 c_param.
env =
const_cast<char*
>(env.c_str());
379 c_param.
operator_id =
const_cast<char*
>(operator_id.c_str());
388 bool use_custom_content{
false};
390 bool anti_spam_using_yidun{
true};
429 uint64_t reply_msg_timestamp = 0;
431 uint64_t reply_msg_server_id = 0;
437 uint64_t thread_root_msg_timestamp = 0;
439 uint64_t thread_root_msg_server_id = 0;
470 uint64_t server_id{0};
472 uint64_t channel_id{0};
476 uint32_t msg_sub_type{0};
478 std::string msg_body{
""};
480 std::shared_ptr<IQChatAttachInterface> msg_attach{std::make_shared<QChatDefaultAttach>()};
482 std::string msg_ext{
""};
484 std::string msg_id{
""};
486 bool resend_flag{
false};
488 bool mention_all{
false};
490 std::vector<std::string> mention_accids{};
492 std::vector<uint64_t> mention_role_ids{};
494 bool history_enable{
true};
496 std::string push_payload{
""};
498 std::string push_content{
""};
500 bool push_enable{
false};
502 bool need_badge{
true};
504 bool need_push_nick{
true};
506 bool route_enable{
true};
520 msg_attach = CreateAttach(c_param);
525 mention_accids.clear();
529 mention_role_ids.clear();
542 env = c_param.
env ? c_param.
env :
"";
550 c_param.
msg_body =
const_cast<char*
>(msg_body.c_str());
551 c_param.
msg_ext =
const_cast<char*
>(msg_ext.c_str());
552 c_param.
msg_id =
const_cast<char*
>(msg_id.c_str());
556 c_mention_accids.clear();
557 for (
auto& accid : mention_accids) {
558 c_mention_accids.emplace_back(
const_cast<char*
>(accid.c_str()));
561 c_param.
mention_accids =
const_cast<char**
>(c_mention_accids.data());
565 c_param.
push_payload =
const_cast<char*
>(push_payload.c_str());
566 c_param.
push_content =
const_cast<char*
>(push_content.c_str());
574 ParseAttach(msg_attach, c_param);
577 c_param.
env =
const_cast<char*
>(env.c_str());
580 using AttachRawCreateFunc = std::function<std::shared_ptr<IQChatAttachInterface>(
const std::string&)>;
581 using AttachCreateFunc = std::function<std::shared_ptr<IQChatAttachInterface>(
const NIMQChatMessage&)>;
582 using AttachParseFunc = std::function<void(
const std::shared_ptr<IQChatAttachInterface>&,
NIMQChatMessage&)>;
583 static std::map<NIMQChatMsgType, AttachRawCreateFunc> attach_raw_create_function_;
584 static std::shared_ptr<IQChatAttachInterface> CreateAttachWithRawData(
NIMQChatMsgType type,
const std::string& raw_data) {
585 auto iter = attach_raw_create_function_.find(type);
586 if (iter != attach_raw_create_function_.end()) {
587 return iter->second(raw_data);
589 return std::make_shared<QChatDefaultAttach>(raw_data);
593 std::shared_ptr<IQChatAttachInterface> CreateAttach(
const NIMQChatMessage& m) {
594 auto iter = attach_create_functions_.find(m.
msg_type);
595 if (iter != attach_create_functions_.end()) {
596 return iter->second(m);
600 void ParseAttach(
const std::shared_ptr<IQChatAttachInterface>& p,
NIMQChatMessage& cp)
const {
604 auto iter = attach_parse_functions_.find(cp.
msg_type);
605 if (iter != attach_parse_functions_.end()) {
608 cp.
default_attach = std::dynamic_pointer_cast<QChatDefaultAttach>(p)->ToCParam();
611 template <
typename ATTACH_TYPE>
612 static std::shared_ptr<ATTACH_TYPE> GetOriginAttach(
const std::shared_ptr<IQChatAttachInterface>& p) {
613 auto attach = std::dynamic_pointer_cast<ATTACH_TYPE>(p);
617 return std::make_shared<ATTACH_TYPE>(p->GetRawData());
621 std::map<NIMQChatMsgType, AttachCreateFunc> attach_create_functions_ = {
632 std::map<NIMQChatMsgType, AttachParseFunc> attach_parse_functions_ = {
634 { cp.
default_attach = GetOriginAttach<QChatDefaultAttach>(p)->ToCParam(); } },
636 { cp.
image_attach = GetOriginAttach<QChatImageAttach>(p)->ToCParam(); } },
638 { cp.
audio_attach = GetOriginAttach<QChatAudioAttach>(p)->ToCParam(); } },
640 { cp.
video_attach = GetOriginAttach<QChatVideoAttach>(p)->ToCParam(); } },
642 { cp.
file_attach = GetOriginAttach<QChatFileAttach>(p)->ToCParam(); } },
644 { cp.
location_attach = GetOriginAttach<QChatLocationAttach>(p)->ToCParam(); } },
648 { cp.
tips_attach = GetOriginAttach<QChatTipsAttach>(p)->ToCParam(); } }
653 mutable std::vector<char*> c_mention_accids;
673 c_param.
msg_body =
const_cast<char*
>(msg_body.c_str());
674 c_param.
msg_ext =
const_cast<char*
>(msg_ext.c_str());
704 c_param.
operator_id =
const_cast<char*
>(operator_id.c_str());
706 c_param.
postscript =
const_cast<char*
>(postscript.c_str());
707 c_param.
extension =
const_cast<char*
>(extension.c_str());
708 c_param.
push_content =
const_cast<char*
>(push_content.c_str());
709 c_param.
push_payload =
const_cast<char*
>(push_payload.c_str());
720 uint64_t msg_server_id{0};
722 std::string from_accid{
""};
724 uint32_t from_client_type{0};
726 std::string from_device_id{
""};
728 std::string from_nick{
""};
730 uint64_t timestamp{0};
732 uint64_t update_timestamp{0};
736 bool is_anti_spamed{
false};
764 accids_of_mentioned_roles.clear();
770 auto c_param = QChatMessageSend::ToCParam();
771 c_param.status = status;
772 c_param.msg_server_id = msg_server_id;
773 c_param.from_accid =
const_cast<char*
>(from_accid.c_str());
774 c_param.from_client_type = from_client_type;
775 c_param.from_device_id =
const_cast<char*
>(from_device_id.c_str());
776 c_param.from_nick =
const_cast<char*
>(from_nick.c_str());
777 c_param.timestamp = timestamp;
778 c_param.update_timestamp = update_timestamp;
779 c_param.notify_reason = notify_reason;
780 c_param.is_anti_spamed = is_anti_spamed;
781 c_param.callback_ext =
const_cast<char*
>(callback_ext.c_str());
782 c_param.anti_spam_result =
const_cast<char*
>(anti_spam_result.c_str());
783 c_param.update_content = update_content.ToCParam();
784 c_param.update_ope_info = update_ope_info.ToCParam();
785 c_param.accids_of_mentioned_roles_available = accids_of_mentioned_roles_available;
786 c_accids_of_mentioned_roles.clear();
787 for (
auto& accid : accids_of_mentioned_roles) {
788 c_accids_of_mentioned_roles.emplace_back(
const_cast<char*
>(accid.c_str()));
790 c_param.accids_of_mentioned_roles =
const_cast<char**
>(c_accids_of_mentioned_roles.data());
791 c_param.accids_of_mentioned_roles_count = c_accids_of_mentioned_roles.size();
796 bool accids_of_mentioned_roles_available{
false};
801 mutable std::vector<char*> c_accids_of_mentioned_roles;
815 uint32_t res_code{0};
830 uint32_t res_code{0};
842 c_response.
message = message.ToCParam();
854 uint32_t res_code{0};
866 c_response.
message = message.ToCParam();
875 uint32_t res_code{0};
877 std::list<QChatMessage> messages{};
884 messages.emplace_back(c_resp.
messages[i]);
891 for (
const auto& msg : messages) {
892 message_.push_back(msg.ToCParam());
895 c_response.
messages_count =
static_cast<uint32_t
>(message_.size());
900 mutable std::vector<NIMQChatMessage> message_;
906 uint32_t res_code{0};
908 std::map<uint64_t, QChatMessage> messages{};
911 res_code = c_resp.res_code;
914 for (
size_t i = 0; i < c_resp.messages_count; i++) {
915 messages.emplace(c_resp.messages[i].channel_id, c_resp.messages[i]);
920 c_response.res_code = res_code;
922 for (
auto&& iter : messages) {
923 message_.push_back(iter.second.ToCParam());
926 c_response.messages_count =
static_cast<uint32_t
>(message_.size());
931 mutable std::vector<NIMQChatMessage> message_;
946 uint32_t res_code = 0;
956 c_response.res_code = res_code;
957 c_response.unread_info = unread_info;
965 uint32_t res_code{0};
977 meta_info = c_resp.meta_info;
978 root_message = c_resp.root_message;
979 for (
size_t i = 0; i < c_resp.messages_count; i++) {
980 messages.emplace_back(c_resp.messages[i]);
985 c_response.meta_info = meta_info;
988 c_response.root_message = root_message.ToCParam();
990 for (
auto& message : messages)
991 messages_.push_back(message.ToCParam());
993 c_response.messages_count = messages_.size();
999 mutable std::vector<NIMQChatMessage> messages_;
1005 uint32_t res_code = 0;
1014 meta_infos.emplace_back(c_resp.
meta_infos[i]);
1044 type = c_param.
type;
1045 count = c_param.
count;
1048 accids.emplace_back(c_param.
accids[i]);
1054 detail.
count = count;
1057 for (
auto& account : accids)
1058 accids_.push_back(
const_cast<char*
>(account.c_str()));
1059 detail.
accids =
const_cast<char**
>(accids_.data());
1065 mutable std::vector<char*> accids_;
1087 count = c_param.
count;
1090 details.emplace_back(c_param.
detail[i]);
1101 for (
auto& d : details)
1102 detail_.push_back(d.ToCParam());
1109 mutable std::vector<NIMQChatQuickCommentDetail> detail_;
1115 uint32_t res_code{0};
1117 std::list<QChatQuickCommentInfo> comments{};
1123 for (
size_t i = 0; i < c_response.comments_count; i++) {
1124 comments.emplace_back(c_response.comments[i]);
1133 for (
auto& comment : comments)
1134 comments_.push_back(comment.ToCParam());
1136 c_response.comments_count = comments_.size();
1141 mutable std::vector<NIMQChatQuickCommentInfo> comments_;
1166 c_messages.push_back(message.ToCParam());
1173 mutable std::vector<NIMQChatMessage> c_messages;
1251 auto c_response = response.ToCParam();
1253 c_callback(c_response);
1261 InvokeCallback<SendMsgCallback, NIMQChatSendMessageResp>(resp);
1263 param.
message = message.ToCParam();
1275 uint64_t msg_server_id{0};
1277 uint64_t timestamp{0};
1286 std::string msg_body{
""};
1288 std::string msg_ext{
""};
1290 uint32_t msg_sub_type{0};
1303 auto c_response = response.ToCParam();
1305 c_callback(c_response);
1314 cb = [c_callback = c_param.
cb, user_data = c_param.
user_data](
const QChatUpdateMessageResp& response) {
1315 auto c_response = response.ToCParam();
1317 c_callback(c_response);
1326 cb = [c_callback = c_param.
cb, user_data = c_param.
user_data](
const QChatUpdateMessageResp& response) {
1327 auto c_response = response.ToCParam();
1329 c_callback(c_response);
1337 InvokeCallback<UpdateMsgCallback, NIMQChatUpdateMessageResp>(resp);
1345 param.
msg_body =
const_cast<char*
>(msg_body.c_str());
1346 param.
msg_ext =
const_cast<char*
>(msg_ext.c_str());
1357 uint64_t msg_server_id{0};
1358 uint64_t timestamp{0};
1359 QChatMessageUpdateInfo update_info{};
1365 InvokeCallback<UpdateMsgCallback, NIMQChatUpdateMessageResp>(resp);
1380 uint64_t msg_server_id{0};
1381 uint64_t timestamp{0};
1382 QChatMessageUpdateInfo update_info{};
1388 InvokeCallback<UpdateMsgCallback, NIMQChatUpdateMessageResp>(resp);
1403 uint64_t server_id{0};
1405 uint64_t channel_id{0};
1407 uint64_t from_time{0};
1409 uint64_t to_time{0};
1411 uint64_t exclude_msg_server_id{0};
1413 uint32_t limit{100};
1415 bool reverse{
false};
1423 limit = c_param.
limit;
1426 auto c_response = response.ToCParam();
1428 c_callback(c_response);
1436 InvokeCallback<GetMessagesCallback, NIMQChatGetMessagesResp>(resp);
1443 param.
limit = limit;
1454 uint64_t server_id{0};
1456 std::vector<uint64_t> channel_ids{};
1463 cb = [c_callback = c_param.
cb, user_data = c_param.
user_data](
const QChatGetLastMessagesResp& response) {
1464 auto c_response = response.ToCParam();
1466 c_callback(c_response);
1474 InvokeCallback<GetLastMessagesCallback, NIMQChatGetLastMessagesResp>(resp);
1478 param.
channel_ids =
const_cast<uint64_t*
>(channel_ids.data());
1497 InvokeCallback<GetMessagesCacheCallback, NIMQChatGetMessagesCacheResp>(resp);
1512 uint64_t timestamp{0};
1518 auto c_response = response.ToCParam();
1520 c_callback(c_response);
1528 InvokeCallback<MarkMessageReadCallback, NIMQChatMarkMessageReadResp>(resp);
1549 auto c_response = response.ToCParam();
1551 c_callback(&c_response);
1558 param.
message = message.ToCParam();
1561 InvokeCallback<ReplyMessageCallback, NIMQChatReplyMsgResp>(*c_response);
1570 uint64_t server_id = 0;
1571 uint64_t channel_id = 0;
1572 std::vector<NIMQChatGetMessageColumns> columns;
1578 columns.push_back(c_param.
columns[i]);
1581 auto c_response = response.ToCParam();
1583 c_callback(&c_response);
1595 InvokeCallback<GetMessageHistoryByIdsCallback, NIMQChatGetMessageHistoryByIdsResp>(*c_response);
1608 type = c_param.
type;
1611 auto c_response = response.ToCParam();
1613 c_callback(&c_response);
1619 param.
message = message.ToCParam();
1622 InvokeCallback<GetReferMessagesCallback, NIMQChatGetReferMessagesResp>(*c_response);
1635 uint64_t from_time = 0;
1637 uint64_t to_time = 0;
1639 uint64_t exclude_msg_server_id = 0;
1641 uint32_t limit = 10;
1643 bool reverse =
false;
1650 limit = c_param.
limit;
1653 auto c_response = response.ToCParam();
1655 c_callback(&c_response);
1661 param.
message = message.ToCParam();
1665 param.
limit = limit;
1669 InvokeCallback<GetThreadMessagesCallback, NIMQChatGetThreadMessagesResp>(*c_response);
1675template <NIMQChatQuickCommentOperation operation,
typename TCParam,
typename TCResponse>
1685 message = c_param.quote_message;
1686 type = c_param.type;
1687 opt = c_param.operation;
1689 auto c_response = response.ToCParam();
1691 c_callback(&c_response);
1694 const TCParam ToCParam()
const {
1699 param.operation = opt;
1700 param.user_data = cb_holder;
1701 param.cb = [](
const TCResponse* c_response) {
1702 InvokeCallback<QuickCommentCallback, TCResponse>(*c_response);
1717 uint64_t server_id = 0;
1718 uint64_t channel_id = 0;
1719 std::list<QChatMessage> thread_root_messages;
1725 thread_root_messages.push_back(c_param.
messages[i]);
1728 auto c_response = response.ToCParam();
1730 c_callback(&c_response);
1738 for (
auto& message : thread_root_messages) {
1739 messages_.push_back(message.ToCParam());
1745 InvokeCallback<GetThreadRootMessagesMetaCallback, NIMQChatGetThreadRootMessagesMetaResp>(*c_response);
1751 mutable std::vector<NIMQChatMessage> messages_;
1755using QChatAddQuickCommentParam = QChatQuickCommentParam<kNIMQChatQuickCommentAdd, NIMQChatAddQuickCommentParam, NIMQChatAddQuickCommentResp>;
1756using QChatRemoveQuickCommentParam = QChatQuickCommentParam<kNIMQChatQuickCommentRemove, NIMQChatRemoveQuickCommentParam, NIMQChatRemoveQuickCommentResp>;
1776 auto c_response = response.ToCParam();
1778 c_callback(&c_response);
1790 InvokeCallback<GetQuickCommentsCallback, NIMQChatGetQuickCommentsResp>(*resp);
1819 bool include_self{
false};
1837 msg_types.push_back(c_param.
msg_types[i]);
1839 sub_types.push_back(c_param.
sub_types[i]);
1841 order = c_param.
order;
1842 sort = c_param.
sort;
1843 limit = c_param.
limit;
1846 auto c_response = response.ToCParam();
1848 c_callback(&c_response);
1853 param.
keyword =
const_cast<char*
>(keyword.c_str());
1856 param.
from_accid =
const_cast<char*
>(from_accid.c_str());
1861 param.
sub_types =
const_cast<uint32_t*
>(sub_types.data());
1864 param.
order = order;
1866 param.
limit = limit;
1867 param.
cursor =
const_cast<char*
>(cursor.c_str());
1870 InvokeCallback<MessageSearchPageCallback, NIMQChatMessageSearchPageResp>(*c_response);
Represents a JSON value.
Definition: value.h:196
bool isMember(const char *key) const
Definition: json_value.cpp:1241
String asString() const
Embedded zeroes are possible.
Definition: json_value.cpp:632
std::function< void(const QChatGetLastMessagesResp &)> GetLastMessagesCallback
查询频道最后一条消息回调
Definition: nim_qchat_message_cpp_def.h:1187
std::function< void(const QChatGetMessagesResp &)> GetMessagesCallback
查询历史消息回调
Definition: nim_qchat_message_cpp_def.h:1185
std::function< void(const QChatSendMessageResp &)> SendMsgCallback
发送消息回调
Definition: nim_qchat_message_cpp_def.h:1179
std::function< void(const QChatMarkMessageReadResp &)> MarkMessageReadCallback
消息已读标记回调
Definition: nim_qchat_message_cpp_def.h:1191
std::function< void(const QChatBaseResp &)> QChatBaseCallback
通用回调模板
Definition: nim_qchat_public_cpp_def.h:95
GetMessagesCallback GetMessagesCacheCallback
本地获取消息回调
Definition: nim_qchat_message_cpp_def.h:1189
GetMessagesCallback GetMessageHistoryByIdsCallback
根据消息 ID 查询消息回调
Definition: nim_qchat_message_cpp_def.h:1195
std::function< void(const QChatMsgUpdatedResp &)> MsgUpdatedCallback
消息更新回调
Definition: nim_qchat_message_cpp_def.h:1183
QChatBaseCallback QuickCommentCallback
添加快捷回复回调
Definition: nim_qchat_message_cpp_def.h:1203
std::function< void(const QChatGetThreadRootMessagesMetaResp &)> GetThreadRootMessagesMetaCallback
查询Thread消息元信息回调
Definition: nim_qchat_message_cpp_def.h:1201
std::function< void(const QChatGetThreadMessagesResp &)> GetThreadMessagesCallback
查询Thread消息回调
Definition: nim_qchat_message_cpp_def.h:1199
GetMessagesCallback GetReferMessagesCallback
获取关联消息回调
Definition: nim_qchat_message_cpp_def.h:1197
std::function< void(const QChatMessageSearchPageResp &)> MessageSearchPageCallback
消息分页搜索回调
Definition: nim_qchat_message_cpp_def.h:1207
std::function< void(const QChatRecvMsgResp &)> RecvMsgCallback
接收消息回调
Definition: nim_qchat_message_cpp_def.h:1177
std::function< void(const QChatGetQuickCommentsResp &)> GetQuickCommentsCallback
查询快捷回复回调
Definition: nim_qchat_message_cpp_def.h:1205
std::function< void(const QChatUpdateMessageResp &)> UpdateMsgCallback
更新消息回调
Definition: nim_qchat_message_cpp_def.h:1181
std::function< void(const QChatReplyMessageResp &)> ReplyMessageCallback
回复消息回调
Definition: nim_qchat_message_cpp_def.h:1193
bool ParseJsonValue(const std::string &content, nim_cpp_wrapper_util::Json::Value &values)
解析JsonString
Definition: nim_json_util.cpp:70
std::string GetJsonStringWithNoStyled(const nim_cpp_wrapper_util::Json::Value &values)
获得非格式化的Json string,传入SDK的json string格式要求为非格式化的,如果是格式化的json string可能会影响功能
Definition: nim_json_util.cpp:89
@ kNIMResSuccess
Definition: nim_chatroom_res_code_def.h:18
NIMQChatGetReferMessageType
Definition: nim_qchat_message_def.h:76
NIMQChatQuickCommentOperation
Definition: nim_qchat_message_def.h:68
NIMQChatMsgType
Definition: nim_qchat_message_def.h:44
@ kNIMQChatMsgTypeNotification
通知类型消息
Definition: nim_qchat_message_def.h:56
@ kNIMQChatMsgTypeVideo
视频类型消息
Definition: nim_qchat_message_def.h:52
@ kNIMQChatMsgTypeText
文本类型消息
Definition: nim_qchat_message_def.h:46
@ kNIMQChatMsgTypeTips
提醒类型消息
Definition: nim_qchat_message_def.h:60
@ kNIMQChatMsgTypeAudio
音频类型消息
Definition: nim_qchat_message_def.h:50
@ kNIMQChatMsgTypeLocation
位置类型消息
Definition: nim_qchat_message_def.h:54
@ kNIMQChatMsgTypeFile
文件类型消息
Definition: nim_qchat_message_def.h:58
@ kNIMQChatMsgTypeUnknown
未知类型消息,作为默认值
Definition: nim_qchat_message_def.h:64
@ kNIMQChatMsgTypeImage
图片类型消息
Definition: nim_qchat_message_def.h:48
NIMQChatMessageStatus
Definition: nim_qchat_message_def.h:23
@ kMsgStatusRevoke
被撤回的消息
Definition: nim_qchat_message_def.h:27
@ kMsgStatusNormal
普通消息状态
Definition: nim_qchat_message_def.h:25
@ kMsgStatusDelete
被删除的消息
Definition: nim_qchat_message_def.h:29
NIMQChatMessageNotifyReason
Definition: nim_qchat_message_def.h:34
@ kMessageNotifyReasonUnkonw
未知原因
Definition: nim_qchat_message_def.h:36
@ kNIMLocalResMsgAccessDenied
禁止访问
Definition: nim_qchat_public_def.h:276
NIMQChatMessageSearchSort
消息搜索排序规则
Definition: nim_qchat_public_def.h:108
NIMQChatSearchOrder
搜索排序顺序
Definition: nim_qchat_public_def.h:82
Definition: nim_qchat_message_def.h:103
Definition: nim_qchat_public_def.h:130
Definition: nim_qchat_message_def.h:86
Definition: nim_qchat_message_def.h:587
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_message_def.h:599
NIMQChatChannelIDInfo id_info
频道ID信息
Definition: nim_qchat_message_def.h:593
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:597
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:591
nim_qchat_update_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:589
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:595
Definition: nim_qchat_message_def.h:140
Definition: nim_qchat_message_def.h:625
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:629
uint64_t * channel_ids
频道ID
Definition: nim_qchat_message_def.h:633
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:631
nim_qchat_get_last_messages_cb_func cb
查询历史消息异步回调
Definition: nim_qchat_message_def.h:627
size_t channel_ids_count
频道ID数量
Definition: nim_qchat_message_def.h:635
Definition: nim_qchat_message_def.h:675
Definition: nim_qchat_message_def.h:683
size_t column_count
查询的消息数量
Definition: nim_qchat_message_def.h:692
uint64_t channel_id
频道 ID
Definition: nim_qchat_message_def.h:688
NIMQChatGetMessageColumns * columns
消息列表
Definition: nim_qchat_message_def.h:690
uint64_t server_id
服务器 ID
Definition: nim_qchat_message_def.h:686
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:694
Definition: nim_qchat_message_def.h:639
nim_qchat_query_history_msg_cache_cb_func cb
查询本地缓存消息历史异步回调
Definition: nim_qchat_message_def.h:641
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:647
uint64_t channel_id
频道 ID
Definition: nim_qchat_message_def.h:645
uint64_t server_id
服务器 ID
Definition: nim_qchat_message_def.h:643
Definition: nim_qchat_message_def.h:603
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:609
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:619
bool reverse
是否倒序, false: 否, true: 是
Definition: nim_qchat_message_def.h:621
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:607
nim_qchat_query_history_msg_cb_func cb
查询历史消息异步回调
Definition: nim_qchat_message_def.h:605
uint64_t exclude_msg_server_id
排除某条消息, msg server id
Definition: nim_qchat_message_def.h:617
uint64_t from_time
查询开始时间
Definition: nim_qchat_message_def.h:613
uint64_t to_time
查询结束时间
Definition: nim_qchat_message_def.h:615
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:611
Definition: nim_qchat_message_def.h:357
size_t messages_count
消息数量
Definition: nim_qchat_message_def.h:363
NIMQChatMessage * messages
消息列表
Definition: nim_qchat_message_def.h:365
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:359
Definition: nim_qchat_message_def.h:698
nim_qchat_get_refer_messages_cb_func cb
获取引用消息异步回调
Definition: nim_qchat_message_def.h:700
NIMQChatGetReferMessageType type
查询的类型
Definition: nim_qchat_message_def.h:702
NIMQChatMessage message
要查询的消息体
Definition: nim_qchat_message_def.h:704
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:706
Definition: nim_qchat_message_def.h:710
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:714
uint64_t exclude_msg_server_id
排除某条消息, message server id
Definition: nim_qchat_message_def.h:720
nim_qchat_get_thread_messages_cb_func cb
查询 thread 消息异步回调
Definition: nim_qchat_message_def.h:712
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:722
bool reverse
是否倒序, false: 否, true: 是
Definition: nim_qchat_message_def.h:724
uint64_t from_time
查询开始时间
Definition: nim_qchat_message_def.h:716
uint64_t to_time
查询结束时间
Definition: nim_qchat_message_def.h:718
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:726
Definition: nim_qchat_message_def.h:441
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:443
Definition: nim_qchat_message_def.h:91
Definition: nim_qchat_message_def.h:127
Definition: nim_qchat_message_def.h:651
NIMQChatChannelIDInfo id_info
标记已读channel ID
Definition: nim_qchat_message_def.h:657
uint64_t timestamp
标记消息已读时间戳
Definition: nim_qchat_message_def.h:659
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:655
nim_qchat_ack_cb_func cb
标记消息已读异步回调
Definition: nim_qchat_message_def.h:653
Definition: nim_qchat_message_def.h:344
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:346
NIMQChatUnreadInfo unread_info
未读数信息
Definition: nim_qchat_message_def.h:350
Definition: nim_qchat_public_def.h:159
bool use_custom_content
是否需要使用自定义反垃圾字段(即antiSpamContent), false:不需要, true:需要, 默认0, 一般使用的情况是通用反垃圾转易盾
Definition: nim_qchat_public_def.h:161
bool anti_spam_using_yidun
单条消息是否使用易盾反垃圾, false:(在开通易盾的情况下)不过易盾反垃圾, 其他都是按照原来的规则
Definition: nim_qchat_public_def.h:163
char * yidun_anti_spam_ext
易盾反垃圾扩展字段, 限制json, 长度限制1024
Definition: nim_qchat_public_def.h:173
char * anti_spam_content
反垃圾内容, 开发者自定义的反垃圾字段, 如果提供了这个字段, 在过反垃圾时不会再使用body或者attach
Definition: nim_qchat_public_def.h:165
char * anti_spam_bussiness_id
反垃圾业务ID, 对某些单条消息另外的反垃圾的业务ID
Definition: nim_qchat_public_def.h:167
char * yidun_callback_url
易盾check的回调URL
Definition: nim_qchat_public_def.h:169
char * yidun_anti_cheating
易盾反垃圾增强反作弊专属字段, 限制json, 长度限制1024
Definition: nim_qchat_public_def.h:171
Definition: nim_qchat_message_def.h:202
uint32_t msg_sub_type
消息子类型
Definition: nim_qchat_message_def.h:210
bool need_push_nick
是否需要推送昵称, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_message_def.h:238
uint32_t from_client_type
消息发送者的客户端类型
Definition: nim_qchat_message_def.h:281
NIMQChatNotificationAttach notification_attach
通知消息附件
Definition: nim_qchat_message_def.h:265
bool route_enable
是否需要抄送, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_message_def.h:240
size_t mention_accids_count
@成员列表长度
Definition: nim_qchat_message_def.h:222
char * env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_message_def.h:250
char * push_payload
自定义的推送属性,限制json
Definition: nim_qchat_message_def.h:230
NIMQChatMsgType msg_type
消息类型
Definition: nim_qchat_message_def.h:208
NIMQChatTipsAttach tips_attach
提醒消息附件
Definition: nim_qchat_message_def.h:269
char ** mention_accids
@成员列表
Definition: nim_qchat_message_def.h:220
NIMQChatVideoAttach video_attach
视频消息附件
Definition: nim_qchat_message_def.h:261
bool history_enable
该消息是否存储云端历史,0:不支持,1:支持
Definition: nim_qchat_message_def.h:228
uint64_t server_id
消息所属的server id
Definition: nim_qchat_message_def.h:204
bool accids_of_mentioned_roles_available
@身份组所包含的accid列表是否有效
Definition: nim_qchat_message_def.h:298
bool mention_all
是否@所有人,false:否,true:是
Definition: nim_qchat_message_def.h:218
uint64_t channel_id
消息所属的channel id
Definition: nim_qchat_message_def.h:206
char * callback_ext
第三方回调扩展字段
Definition: nim_qchat_message_def.h:252
char * from_accid
消息发送者的accid
Definition: nim_qchat_message_def.h:279
bool push_enable
是否需要推送, false: 不需要, true: 需要, 默认 false
Definition: nim_qchat_message_def.h:234
NIMQChatMessageThreadInfo thread_info
回复消息信息
Definition: nim_qchat_message_def.h:242
char * push_content
自定义的推送内容
Definition: nim_qchat_message_def.h:232
NIMQChatImageAttach image_attach
图片消息附件
Definition: nim_qchat_message_def.h:257
char * from_device_id
消息发送者的设备id
Definition: nim_qchat_message_def.h:283
uint64_t * mention_role_ids
@身份组列表
Definition: nim_qchat_message_def.h:224
char ** accids_of_mentioned_roles
@身份组所包含的accid列表(部分)
Definition: nim_qchat_message_def.h:300
NIMQChatFileAttach file_attach
文件消息附件
Definition: nim_qchat_message_def.h:267
bool need_badge
是否需要消息计数, false: 不需要, true: 需要, 默认 true
Definition: nim_qchat_message_def.h:236
NIMQChatAudioAttach audio_attach
音频消息附件
Definition: nim_qchat_message_def.h:259
uint64_t update_timestamp
消息更新时间戳
Definition: nim_qchat_message_def.h:289
size_t mention_role_ids_count
@身份组列表长度
Definition: nim_qchat_message_def.h:226
char * from_nick
消息发送者的昵称
Definition: nim_qchat_message_def.h:285
NIMQChatLocationAttach location_attach
位置消息附件
Definition: nim_qchat_message_def.h:263
char * msg_ext
消息扩展字段
Definition: nim_qchat_message_def.h:214
NIMQChatMessageNotifyReason notify_reason
消息下发原因
Definition: nim_qchat_message_def.h:291
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:287
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:277
NIMQChatMessageAntiSpamInfo anti_spam_info
反垃圾信息
Definition: nim_qchat_message_def.h:244
NIMQChatDefaultAttach default_attach
默认附件
Definition: nim_qchat_message_def.h:255
char * msg_body
消息内容
Definition: nim_qchat_message_def.h:212
NIMQChatMessageStatus status
消息状态
Definition: nim_qchat_message_def.h:273
size_t accids_of_mentioned_roles_count
@身份组所包含的accid列表长度(部分)
Definition: nim_qchat_message_def.h:302
char * anti_spam_result
反垃圾结果
Definition: nim_qchat_message_def.h:248
NIMQChatMessageUpdateOpeInfo update_ope_info
上次消息变更操作信息
Definition: nim_qchat_message_def.h:295
char * msg_id
消息id
Definition: nim_qchat_message_def.h:275
NIMQChatMessageUpdateContent update_content
上次消息变更内容
Definition: nim_qchat_message_def.h:293
bool resend_flag
重发标记,false:不是重发,true:是重发
Definition: nim_qchat_message_def.h:216
bool is_anti_spamed
是否被反垃圾拦截, false: 未被拦截, true: 已被拦截, 默认 false
Definition: nim_qchat_message_def.h:246
Definition: nim_qchat_message_def.h:779
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:783
uint64_t channel_id
频道ID
Definition: nim_qchat_message_def.h:789
char * from_accid
消息发送者ID
Definition: nim_qchat_message_def.h:791
uint64_t from_time
搜索的开始时间
Definition: nim_qchat_message_def.h:793
size_t msg_types_count
搜索的消息类型数量
Definition: nim_qchat_message_def.h:797
char * keyword
搜索的关键字
Definition: nim_qchat_message_def.h:785
NIMQChatSearchOrder order
排序顺序
Definition: nim_qchat_message_def.h:807
uint64_t server_id
服务器ID
Definition: nim_qchat_message_def.h:787
NIMQChatMsgType * msg_types
搜索的消息类型
Definition: nim_qchat_message_def.h:799
uint32_t * sub_types
搜索的消息子类型
Definition: nim_qchat_message_def.h:803
char * cursor
查询游标, 查询的起始位置
Definition: nim_qchat_message_def.h:813
size_t sub_types_count
搜索的消息子类型数量
Definition: nim_qchat_message_def.h:801
NIMQChatMessageSearchSort sort
排序规则
Definition: nim_qchat_message_def.h:809
bool include_self
是否包含自己的消息
Definition: nim_qchat_message_def.h:805
uint64_t to_time
搜索的结束时间
Definition: nim_qchat_message_def.h:795
nim_qchat_message_search_page_cb_func cb
消息搜索异步回调
Definition: nim_qchat_message_def.h:781
uint32_t limit
查询条数
Definition: nim_qchat_message_def.h:811
Definition: nim_qchat_message_def.h:465
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:469
size_t messages_count
消息数量
Definition: nim_qchat_message_def.h:473
NIMQChatMessage * messages
消息列表
Definition: nim_qchat_message_def.h:475
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:467
NIMQChatPageInfo page_info
分页信息
Definition: nim_qchat_message_def.h:471
Definition: nim_qchat_message_def.h:156
char * reply_from_accid
被回复的消息所有者 ID
Definition: nim_qchat_message_def.h:158
char * thread_root_accid
thread 根消息的所有者 ID
Definition: nim_qchat_message_def.h:166
char * reply_msg_client_id
被回复消息得客户端消息 ID
Definition: nim_qchat_message_def.h:164
uint64_t reply_msg_timestamp
被回复消息得创建时间
Definition: nim_qchat_message_def.h:160
uint64_t thread_root_msg_timestamp
thread 根消息的创建时间
Definition: nim_qchat_message_def.h:168
uint64_t thread_root_msg_server_id
thread 根消息的服务器消息 ID
Definition: nim_qchat_message_def.h:170
char * thread_root_msg_client_id
thread 根消息的客户端消息 ID
Definition: nim_qchat_message_def.h:172
uint64_t reply_msg_server_id
被回复消息得服务器消息 ID
Definition: nim_qchat_message_def.h:162
Definition: nim_qchat_message_def.h:176
NIMQChatMessageStatus status
消息状态
Definition: nim_qchat_message_def.h:178
char * msg_ext
消息扩展字段
Definition: nim_qchat_message_def.h:182
char * msg_body
消息内容
Definition: nim_qchat_message_def.h:180
Definition: nim_qchat_public_def.h:138
char * push_content
推送文案
Definition: nim_qchat_public_def.h:144
char * push_payload
推送payload
Definition: nim_qchat_public_def.h:146
bool route_enable
是否需要抄送
Definition: nim_qchat_public_def.h:150
char * extension
操作扩展字段
Definition: nim_qchat_public_def.h:142
char * operator_id
操作者账号
Definition: nim_qchat_public_def.h:153
char * env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_public_def.h:148
uint32_t operator_client_type
操作者客户端类型
Definition: nim_qchat_public_def.h:155
char * postscript
操作附言
Definition: nim_qchat_public_def.h:140
Definition: nim_qchat_message_def.h:186
uint32_t operator_client_type
操作者客户端类型
Definition: nim_qchat_message_def.h:190
char * push_payload
推送payload
Definition: nim_qchat_message_def.h:198
char * push_content
推送文案
Definition: nim_qchat_message_def.h:196
char * operator_id
操作者账号
Definition: nim_qchat_message_def.h:188
char * postscript
操作附言
Definition: nim_qchat_message_def.h:192
char * extension
操作扩展字段
Definition: nim_qchat_message_def.h:194
Definition: nim_qchat_message_def.h:306
NIMQChatMessageUpdateInfo update_info
消息更新信息
Definition: nim_qchat_message_def.h:310
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:312
Definition: nim_qchat_message_def.h:134
Definition: nim_qchat_message_def.h:316
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:320
Definition: nim_qchat_message_def.h:526
nim_qchat_msg_updated_cb_func cb
消息更新异步回调
Definition: nim_qchat_message_def.h:528
Definition: nim_qchat_message_def.h:518
nim_qchat_recv_msg_cb_func cb
接收消息异步回调
Definition: nim_qchat_message_def.h:520
Definition: nim_qchat_message_def.h:663
nim_qchat_reply_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:665
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:671
NIMQChatMessage quote_message
被引用的消息体
Definition: nim_qchat_message_def.h:667
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:669
Definition: nim_qchat_message_def.h:571
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:581
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:575
nim_qchat_update_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:573
NIMQChatChannelIDInfo id_info
频道ID信息
Definition: nim_qchat_message_def.h:577
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_message_def.h:583
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:579
Definition: nim_qchat_message_def.h:534
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:538
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:540
nim_qchat_send_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:536
Definition: nim_qchat_message_def.h:324
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:330
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:326
Definition: nim_qchat_message_def.h:150
Definition: nim_qchat_public_def.h:330
Definition: nim_qchat_message_def.h:544
uint32_t msg_sub_type
消息子类型
Definition: nim_qchat_message_def.h:567
NIMQChatMessageUpdateInfo update_info
更新信息
Definition: nim_qchat_message_def.h:556
uint64_t msg_server_id
消息服务器 id
Definition: nim_qchat_message_def.h:552
NIMQChatChannelIDInfo id_info
频道ID信息
Definition: nim_qchat_message_def.h:550
void * user_data
自定义用户数据
Definition: nim_qchat_message_def.h:548
NIMQChatMessageStatus status
消息状态, 不允许更新为删除或撤回
Definition: nim_qchat_message_def.h:561
uint64_t timestamp
消息发送时间戳
Definition: nim_qchat_message_def.h:554
char * msg_ext
消息扩展字段
Definition: nim_qchat_message_def.h:565
NIMQChatMessageAntiSpamInfo anti_spam_info
反垃圾信息
Definition: nim_qchat_message_def.h:558
char * msg_body
消息体
Definition: nim_qchat_message_def.h:563
nim_qchat_update_msg_cb_func cb
发送消息异步回调
Definition: nim_qchat_message_def.h:546
Definition: nim_qchat_message_def.h:334
NIMQChatMessage message
消息体
Definition: nim_qchat_message_def.h:340
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_def.h:336
Definition: nim_qchat_message_def.h:114
Definition: nim_qchat_message_cpp_def.h:22
Definition: nim_qchat_message_cpp_def.h:148
Definition: nim_qchat_public_cpp_def.h:40
Definition: nim_qchat_message_cpp_def.h:30
Definition: nim_qchat_message_cpp_def.h:1376
Definition: nim_qchat_message_cpp_def.h:45
Definition: nim_qchat_message_cpp_def.h:1450
Definition: nim_qchat_message_cpp_def.h:904
Definition: nim_qchat_message_cpp_def.h:1568
Definition: nim_qchat_message_cpp_def.h:1484
uint64_t server_id
服务器 ID
Definition: nim_qchat_message_cpp_def.h:1488
uint64_t channel_id
频道 ID
Definition: nim_qchat_message_cpp_def.h:1490
Definition: nim_qchat_message_cpp_def.h:1399
Definition: nim_qchat_message_cpp_def.h:873
Definition: nim_qchat_message_cpp_def.h:1602
Definition: nim_qchat_message_cpp_def.h:1629
QChatMessage message
要查询的 thread 依据完整消息体
Definition: nim_qchat_message_cpp_def.h:1633
Definition: nim_qchat_message_cpp_def.h:963
std::list< QChatMessage > messages
消息列表
Definition: nim_qchat_message_cpp_def.h:971
NIMQChatThreadMessageMetaInfo meta_info
thread 消息元信息
Definition: nim_qchat_message_cpp_def.h:967
QChatMessage root_message
消息体
Definition: nim_qchat_message_cpp_def.h:969
Definition: nim_qchat_message_cpp_def.h:102
Definition: nim_qchat_message_cpp_def.h:238
Definition: nim_qchat_message_cpp_def.h:1506
Definition: nim_qchat_message_cpp_def.h:944
Definition: nim_qchat_message_cpp_def.h:386
std::string yidun_callback_url
易盾check的回调URL
Definition: nim_qchat_message_cpp_def.h:396
std::string anti_spam_content
反垃圾内容, 开发者自定义的反垃圾字段, 如果提供了这个字段, 在过反垃圾时不会再使用body或者attach
Definition: nim_qchat_message_cpp_def.h:392
std::string anti_spam_bussiness_id
反垃圾业务ID, 对某些单条消息另外的反垃圾的业务ID
Definition: nim_qchat_message_cpp_def.h:394
std::string yidun_anti_spam_ext
易盾反垃圾扩展字段, 限制json, 长度限制1024
Definition: nim_qchat_message_cpp_def.h:400
std::string yidun_anti_cheating
易盾反垃圾增强反作弊专属字段, 限制json, 长度限制1024
Definition: nim_qchat_message_cpp_def.h:398
Definition: nim_qchat_message_cpp_def.h:715
std::string callback_ext
第三方回调扩展字段
Definition: nim_qchat_message_cpp_def.h:740
std::string anti_spam_result
反垃圾结果
Definition: nim_qchat_message_cpp_def.h:738
uint64_t timestamp
更新消息时消息创建的时间戳,以服务器返回信息为准
Definition: nim_qchat_message_cpp_def.h:730
QChatMessageUpdateContent update_content
上次消息变更内容
Definition: nim_qchat_message_cpp_def.h:742
QChatMessageUpdateOpeInfo update_ope_info
上次消息变更操作信息
Definition: nim_qchat_message_cpp_def.h:744
uint64_t msg_server_id
更新消息时消息服务器端id
Definition: nim_qchat_message_cpp_def.h:720
std::vector< std::string > accids_of_mentioned_roles
@身份组所包含的accid列表(部分)
Definition: nim_qchat_message_cpp_def.h:798
Definition: nim_qchat_message_cpp_def.h:1799
uint32_t limit
查询条数
Definition: nim_qchat_message_cpp_def.h:1825
uint64_t server_id
服务器 ID
Definition: nim_qchat_message_cpp_def.h:1805
uint64_t channel_id
频道 ID
Definition: nim_qchat_message_cpp_def.h:1807
std::vector< uint32_t > sub_types
搜索消息类型
Definition: nim_qchat_message_cpp_def.h:1817
std::vector< NIMQChatMsgType > msg_types
搜索消息类型
Definition: nim_qchat_message_cpp_def.h:1815
std::string cursor
查询游标, 查询的起始位置
Definition: nim_qchat_message_cpp_def.h:1827
NIMQChatSearchOrder order
排序顺序
Definition: nim_qchat_message_cpp_def.h:1821
uint64_t to_time
搜索的结束时间
Definition: nim_qchat_message_cpp_def.h:1813
uint64_t from_time
搜索的开始时间
Definition: nim_qchat_message_cpp_def.h:1811
std::string keyword
搜索关键字
Definition: nim_qchat_message_cpp_def.h:1803
std::string from_accid
消息发送者ID
Definition: nim_qchat_message_cpp_def.h:1809
NIMQChatMessageSearchSort sort
排序规则
Definition: nim_qchat_message_cpp_def.h:1823
Definition: nim_qchat_message_cpp_def.h:1145
uint32_t res_code
操作结果, 参考NIMResCode
Definition: nim_qchat_message_cpp_def.h:1147
std::vector< QChatMessage > messages
消息列表
Definition: nim_qchat_message_cpp_def.h:1151
QChatPageInfo page_info
分页信息
Definition: nim_qchat_message_cpp_def.h:1149
Definition: nim_qchat_message_cpp_def.h:468
QChatMessageThreadInfo thread_info
thread 消息相关信息
Definition: nim_qchat_message_cpp_def.h:508
std::string env
环境变量
Definition: nim_qchat_message_cpp_def.h:512
QChatMessageAntiSpamInfo anti_spam_info
反垃圾信息
Definition: nim_qchat_message_cpp_def.h:510
Definition: nim_qchat_message_cpp_def.h:425
std::string thread_root_accid
thread 根消息的所有者 ID
Definition: nim_qchat_message_cpp_def.h:435
std::string reply_msg_client_id
被回复消息得客户端消息 ID
Definition: nim_qchat_message_cpp_def.h:433
std::string reply_from_accid
被回复的消息所有者 ID
Definition: nim_qchat_message_cpp_def.h:427
std::string thread_root_msg_client_id
thread 根消息的客户端消息 ID
Definition: nim_qchat_message_cpp_def.h:441
Definition: nim_qchat_message_cpp_def.h:657
NIMQChatMessageStatus status
消息状态
Definition: nim_qchat_message_cpp_def.h:659
std::string msg_ext
消息扩展字段
Definition: nim_qchat_message_cpp_def.h:663
std::string msg_body
消息内容
Definition: nim_qchat_message_cpp_def.h:661
Definition: nim_qchat_message_cpp_def.h:344
std::string postscript
操作附言
Definition: nim_qchat_message_cpp_def.h:346
std::string push_content
推送文案
Definition: nim_qchat_message_cpp_def.h:350
std::string push_payload
推送payload
Definition: nim_qchat_message_cpp_def.h:352
bool route_enable
是否需要抄送
Definition: nim_qchat_message_cpp_def.h:356
std::string extension
操作扩展字段
Definition: nim_qchat_message_cpp_def.h:348
std::string env
环境变量,用于指向不同的抄送、第三方回调等配置
Definition: nim_qchat_message_cpp_def.h:354
Definition: nim_qchat_message_cpp_def.h:680
std::string operator_id
操作者账号
Definition: nim_qchat_message_cpp_def.h:682
uint32_t operator_client_type
操作者客户端类型
Definition: nim_qchat_message_cpp_def.h:684
std::string push_content
推送文案
Definition: nim_qchat_message_cpp_def.h:690
std::string extension
操作扩展字段
Definition: nim_qchat_message_cpp_def.h:688
std::string postscript
操作附言
Definition: nim_qchat_message_cpp_def.h:686
std::string push_payload
推送payload
Definition: nim_qchat_message_cpp_def.h:692
Definition: nim_qchat_message_cpp_def.h:813
Definition: nim_qchat_message_cpp_def.h:277
Definition: nim_qchat_public_cpp_def.h:72
Definition: nim_qchat_message_cpp_def.h:805
Definition: nim_qchat_message_cpp_def.h:1226
Definition: nim_qchat_message_cpp_def.h:1210
Definition: nim_qchat_message_cpp_def.h:1537
QChatMessageSend message
回复消息内容
Definition: nim_qchat_message_cpp_def.h:1543
QChatMessage quote_message
被引用的消息体
Definition: nim_qchat_message_cpp_def.h:1541
Definition: nim_qchat_message_cpp_def.h:1353
Definition: nim_qchat_message_cpp_def.h:1242
Definition: nim_qchat_message_cpp_def.h:828
Definition: nim_qchat_message_cpp_def.h:310
Definition: nim_qchat_message_cpp_def.h:1269
Definition: nim_qchat_message_cpp_def.h:852
Definition: nim_qchat_message_cpp_def.h:187