Merge pull request #15 from hcaihao/master

add extra_data
This commit is contained in:
Changhua 2023-04-10 22:30:48 +08:00 committed by GitHub
commit 8e00350cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 2 deletions

View File

@ -61,11 +61,14 @@ class Wcf():
self.sender = msg.sender
self.roomid = msg.roomid
self.content = msg.content
self.extra_data = msg.extra_data
def __str__(self) -> str:
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 += self.content
s += "\n"
s += self.extra_data
return s
def from_self(self) -> bool:

View File

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

View File

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

View File

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

View File

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