add extra_data

This commit is contained in:
hcaihao 2023-04-10 19:58:21 +08:00
parent 6f7f01b8c9
commit 011fceaf1f
5 changed files with 8 additions and 2 deletions

View File

@ -61,11 +61,14 @@ class Wcf():
self.sender = msg.sender self.sender = msg.sender
self.roomid = msg.roomid self.roomid = msg.roomid
self.content = msg.content self.content = msg.content
self.extra_data = msg.extra_data
def __str__(self) -> str: def __str__(self) -> str:
s = f"{'自己发的:' if self._is_self else ''}" s = f"{'自己发的:' if self._is_self else ''}"
s += f"{self.sender}[{self.roomid}]:{self.id}:{self.type}:{self.xml.replace(chr(10), '').replace(chr(9),'')}\n" s += f"{self.sender}[{self.roomid}]:{self.id}:{self.type}:{self.xml.replace(chr(10), '').replace(chr(9),'')}\n"
s += self.content s += self.content
s += "\n"
s += self.extra_data
return s return s
def from_self(self) -> bool: def from_self(self) -> bool:

View File

@ -43,4 +43,5 @@ typedef struct {
string sender; string sender;
string roomid; string roomid;
string content; string content;
string extra_data;
} WxMsg_t; } WxMsg_t;

View File

@ -84,6 +84,7 @@ message WxMsg
string sender = 6; // string sender = 6; //
string roomid = 7; // id string roomid = 7; // id
string content = 8; // string content = 8; //
string extra_data = 9; //
} }
message TextMsg message TextMsg

View File

@ -9,8 +9,8 @@ WxCalls_t wxCalls = {
{ 0x236607C, 0x23660F4, 0x2366128 }, // User Info: wxid, nickname, mobile { 0x236607C, 0x23660F4, 0x2366128 }, // User Info: wxid, nickname, mobile
0x521D30, // Send Message 0x521D30, // Send Message
/* Receive Message: /* Receive Message:
Hook, call, type, self, id, msgXml, roomId, wxId, content */ Hook, call, type, self, id, msgXml, roomId, wxId, content, extra_data */
{ 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70 }, { 0x550F4C, 0xA96350, 0x38, 0x3C, 0x184, 0x1EC, 0x48, 0x170, 0x70, 0x1AC },
{ 0xBD780, 0x771980, 0x521640 }, // Send Image Message { 0xBD780, 0x771980, 0x521640 }, // Send Image Message
{ 0xC3B70, 0x771980, 0x3ED8C0 }, // Send File Message { 0xC3B70, 0x771980, 0x3ED8C0 }, // Send File Message
{ 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message { 0xB8A70, 0x3ED5E0, 0x107F00, 0x3ED7B0, 0x2386FE4 }, // Send xml Message

View File

@ -18,6 +18,7 @@ typedef struct RecvMsg {
DWORD roomId; // 群聊时为群ID私聊时为微信ID DWORD roomId; // 群聊时为群ID私聊时为微信ID
DWORD wxId; // 私聊时为空群聊时为发送者微信ID DWORD wxId; // 私聊时为空群聊时为发送者微信ID
DWORD content; // 消息内容地址 DWORD content; // 消息内容地址
DWORD extra_data; // 附加数据
} RecvMsg_t; } RecvMsg_t;
typedef struct Sendfile { typedef struct Sendfile {