v2TimMessage2CMessage static method
Pointer<Uint8>
v2TimMessage2CMessage(
- V2TimMessage message
)
Implementation
static Pointer<Uint8> v2TimMessage2CMessage(V2TimMessage message) {
return string2PointerInt8(json.encode({
"message_elem_array": message.elemType,
"message_msg_id": message.msgID,
"message_sender": message.sender,
"message_conv_id": message.groupID ?? message.userID,
"message_status": message.status,
"message_custom_str": message.localCustomData,
"message_custom_int": message.localCustomInt,
"message_cloud_custom_str": message.cloudCustomData,
"message_is_from_self": message.isSelf,
"message_is_read": message.isRead,
"message_is_peer_read": message.isPeerRead,
"message_priority": message.priority,
"message_group_at_user_array": message.groupAtUserList,
"message_seq": message.seq,
"message_rand": message.random,
"message_is_excluded_from_unread_count": message.isExcludedFromUnreadCount,
"message_excluded_from_last_message": message.isExcludedFromLastMessage,
"message_need_read_receipt": message.needReadReceipt,
}));
}