From c66b1f7eb2b99d080e5647fee92c0bbdf10d7f41 Mon Sep 17 00:00:00 2001 From: Changhua Date: Thu, 31 Oct 2024 22:59:27 +0800 Subject: [PATCH] Fix SendXmlMessage --- WeChatFerry/rpc/proto/wcf.proto | 2 +- WeChatFerry/spy/rpc_server.cpp | 4 +--- WeChatFerry/spy/send_msg.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WeChatFerry/rpc/proto/wcf.proto b/WeChatFerry/rpc/proto/wcf.proto index 270e5e6..f859336 100644 --- a/WeChatFerry/rpc/proto/wcf.proto +++ b/WeChatFerry/rpc/proto/wcf.proto @@ -117,7 +117,7 @@ message XmlMsg string receiver = 1; // 消息接收人 string content = 2; // xml 内容 string path = 3; // 图片路径 - int32 type = 4; // 消息类型 + uint64 type = 4; // 消息类型 } message MsgTypes { map types = 1; } diff --git a/WeChatFerry/spy/rpc_server.cpp b/WeChatFerry/spy/rpc_server.cpp index 679d38f..bb72d42 100644 --- a/WeChatFerry/spy/rpc_server.cpp +++ b/WeChatFerry/spy/rpc_server.cpp @@ -321,7 +321,6 @@ bool func_send_emotion(char *path, char *receiver, uint8_t *out, size_t *len) return true; } -#if 0 bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) { Response rsp = Response_init_default; @@ -335,7 +334,7 @@ bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) string receiver(xml.receiver); string content(xml.content); string path(xml.path ? xml.path : ""); - uint32_t type = (uint32_t)xml.type; + uint64_t type = (uint64_t)xml.type; SendXmlMessage(receiver, content, path, type); rsp.msg.status = 0; } @@ -349,7 +348,6 @@ bool func_send_xml(XmlMsg xml, uint8_t *out, size_t *len) return true; } -#endif bool func_send_rich_txt(RichText rt, uint8_t *out, size_t *len) { diff --git a/WeChatFerry/spy/send_msg.h b/WeChatFerry/spy/send_msg.h index 1abd0fd..0218a5d 100644 --- a/WeChatFerry/spy/send_msg.h +++ b/WeChatFerry/spy/send_msg.h @@ -17,7 +17,7 @@ typedef struct { void SendTextMessage(string wxid, string msg, string atWxids); void SendImageMessage(string wxid, string path); void SendFileMessage(string wxid, string path); -void SendXmlMessage(string receiver, string xml, string path, int type); +void SendXmlMessage(string receiver, string xml, string path, uint64_t type); void SendEmotionMessage(string wxid, string path); int SendRichTextMessage(RichText_t &rt); int SendPatMessage(string roomid, string wxid);