7 #ifndef _NIM_SDK_CPP_TALKEX_HELPER_QUICK_COMMENT_H_
8 #define _NIM_SDK_CPP_TALKEX_HELPER_QUICK_COMMENT_H_
17 #include "nim_define_include.h"
18 #include "nim_wrapper_util/nim_json_util.h"
40 static void FromJsonString(
const std::string& json_info,
QuickCommentInfo& info);
41 static void FromJsonObject(
const nim_cpp_wrapper_util::Json::Value& json_info,
QuickCommentInfo& info);
54 bool AddMessage(
const IMMessage& message) {
55 if (message_list.size() > 20)
57 if (std::find_if(message_list.begin(), message_list.end(), [&](
const IMMessage& it) {
58 return message.client_msg_id_.compare(it.client_msg_id_) == 0;
59 }) != message_list.end())
61 message_list.emplace_back(message);
67 std::list<IMMessage> message_list;
73 std::string message_client_id;
74 std::list<QuickCommentInfo> quick_comment_list;
76 std::list<QueryQuickCommentsResponseItem> message_quick_comment_list;
81 #endif //_NIM_SDK_CPP_TALKEX_HELPER_QUICK_COMMENT_H_