add extra_data
This commit is contained in:
parent
6f7f01b8c9
commit
011fceaf1f
@ -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:
|
||||
|
@ -43,4 +43,5 @@ typedef struct {
|
||||
string sender;
|
||||
string roomid;
|
||||
string content;
|
||||
string extra_data;
|
||||
} WxMsg_t;
|
||||
|
@ -84,6 +84,7 @@ message WxMsg
|
||||
string sender = 6; // 消息发送者
|
||||
string roomid = 7; // 群 id(如果是群消息的话)
|
||||
string content = 8; // 消息内容
|
||||
string extra_data = 9; // 附加内容
|
||||
}
|
||||
|
||||
message TextMsg
|
||||
|
@ -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
|
||||
|
@ -18,6 +18,7 @@ typedef struct RecvMsg {
|
||||
DWORD roomId; // 群聊时,为群ID;私聊时,为微信ID
|
||||
DWORD wxId; // 私聊时,为空;群聊时,为发送者微信ID
|
||||
DWORD content; // 消息内容地址
|
||||
DWORD extra_data; // 附加数据
|
||||
} RecvMsg_t;
|
||||
|
||||
typedef struct Sendfile {
|
||||
|
Loading…
Reference in New Issue
Block a user