NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
nim_chatroom::ChatRoomMessage结构体 参考

聊天室消息 更多...

#include <nim_chatroom_helper.h>

Public 成员函数

 ChatRoomMessage ()
 
void ParseFromJsonValue (const nim_cpp_wrapper_util::Json::Value &values)
 从JsonValue中解析得到聊天室消息
 
std::string ToJsonString () const
 组装Json Value字符串
 
nim_cpp_wrapper_util::Json::Value ToJsonObject () const
 组装Json Value
 

Public 属性

int64_t room_id_
 消息所属的聊天室id,服务器填写,发送方不需要填写
 
std::string from_id_
 消息发送者的账号,服务器填写,发送方不需要填写
 
int64_t timetag_
 消息发送的时间戳(毫秒),服务器填写,发送方不需要填写
 
NIMChatRoomClientType from_client_type_
 消息发送方客户端类型,服务器填写,发送方不需要填写
 
std::string from_nick_
 发送方昵称,服务器填写,发送方不需要填写
 
std::string from_avatar_
 发送方头像,服务器填写,发送方不需要填写
 
std::string from_ext_
 发送方身份扩展字段,服务器填写,发送方不需要填写
 
std::string third_party_callback_ext_
 第三方回调回来的自定义扩展字段
 
std::string notify_tags_
 对端发送消息或通知时携带的 notify tags 信息
 
std::string anti_spam_res_
 String, 易盾反垃圾返回的结果字段
 
NIMChatRoomMsgType msg_type_ {kNIMChatRoomMsgTypeText}
 消息类型
 
std::string msg_attach_
 消息内容,长度限制2048,json结构, 文本消息和其他消息保持一致
 
std::string client_msg_id_
 客户端消息id
 
std::string msg_body_
 文本消息内容(聊天室机器人文本消息)
 
ChatRoomMessageSetting msg_setting_
 消息属性设置
 
int32_t sub_type_
 消息的子类型,客户端定义,服务器透传
 
std::string local_res_path_
 媒体文件本地绝对路径(客户端)
 
std::string local_res_id_
 媒体文件ID(客户端)
 

详细描述

聊天室消息

构造及析构函数说明

◆ ChatRoomMessage()

nim_chatroom::ChatRoomMessage::ChatRoomMessage ( )
inline

构造函数

成员函数说明

◆ ParseFromJsonValue()

void nim_chatroom::ChatRoomMessage::ParseFromJsonValue ( const nim_cpp_wrapper_util::Json::Value values)
inline

从JsonValue中解析得到聊天室消息

参数
[in]values聊天室消息JsonValue
返回
void

◆ ToJsonObject()

nim_cpp_wrapper_util::Json::Value nim_chatroom::ChatRoomMessage::ToJsonObject ( ) const
inline

组装Json Value

返回
nim_cpp_wrapper_util::Json::Value

◆ ToJsonString()

std::string nim_chatroom::ChatRoomMessage::ToJsonString ( ) const
inline

组装Json Value字符串

返回
string Json Value字符串

类成员变量说明

◆ anti_spam_res_

std::string nim_chatroom::ChatRoomMessage::anti_spam_res_

String, 易盾反垃圾返回的结果字段

◆ client_msg_id_

std::string nim_chatroom::ChatRoomMessage::client_msg_id_

客户端消息id

◆ from_avatar_

std::string nim_chatroom::ChatRoomMessage::from_avatar_

发送方头像,服务器填写,发送方不需要填写

◆ from_client_type_

NIMChatRoomClientType nim_chatroom::ChatRoomMessage::from_client_type_

消息发送方客户端类型,服务器填写,发送方不需要填写

◆ from_ext_

std::string nim_chatroom::ChatRoomMessage::from_ext_

发送方身份扩展字段,服务器填写,发送方不需要填写

◆ from_id_

std::string nim_chatroom::ChatRoomMessage::from_id_

消息发送者的账号,服务器填写,发送方不需要填写

◆ from_nick_

std::string nim_chatroom::ChatRoomMessage::from_nick_

发送方昵称,服务器填写,发送方不需要填写

◆ local_res_id_

std::string nim_chatroom::ChatRoomMessage::local_res_id_

媒体文件ID(客户端)

◆ local_res_path_

std::string nim_chatroom::ChatRoomMessage::local_res_path_

媒体文件本地绝对路径(客户端)

◆ msg_attach_

std::string nim_chatroom::ChatRoomMessage::msg_attach_

消息内容,长度限制2048,json结构, 文本消息和其他消息保持一致

◆ msg_body_

std::string nim_chatroom::ChatRoomMessage::msg_body_

文本消息内容(聊天室机器人文本消息)

◆ msg_setting_

ChatRoomMessageSetting nim_chatroom::ChatRoomMessage::msg_setting_

消息属性设置

◆ msg_type_

NIMChatRoomMsgType nim_chatroom::ChatRoomMessage::msg_type_ {kNIMChatRoomMsgTypeText}

消息类型

◆ notify_tags_

std::string nim_chatroom::ChatRoomMessage::notify_tags_

对端发送消息或通知时携带的 notify tags 信息

◆ room_id_

int64_t nim_chatroom::ChatRoomMessage::room_id_

消息所属的聊天室id,服务器填写,发送方不需要填写

◆ sub_type_

int32_t nim_chatroom::ChatRoomMessage::sub_type_

消息的子类型,客户端定义,服务器透传

◆ third_party_callback_ext_

std::string nim_chatroom::ChatRoomMessage::third_party_callback_ext_

第三方回调回来的自定义扩展字段

◆ timetag_

int64_t nim_chatroom::ChatRoomMessage::timetag_

消息发送的时间戳(毫秒),服务器填写,发送方不需要填写


该结构体的文档由以下文件生成: