go v3.7.0.30.25
This commit is contained in:
parent
c094b77d55
commit
21e9201dcb
@ -1,9 +0,0 @@
|
|||||||
# Generate all fields as pointers.
|
|
||||||
* mangle_names:M_STRIP_PACKAGE
|
|
||||||
* fallback_type:FT_POINTER
|
|
||||||
MsgTypes* fallback_type:FT_CALLBACK
|
|
||||||
RpcContact* fallback_type:FT_CALLBACK
|
|
||||||
DbNames* fallback_type:FT_CALLBACK
|
|
||||||
DbTable* fallback_type:FT_CALLBACK
|
|
||||||
DbField* fallback_type:FT_CALLBACK
|
|
||||||
DbRow* fallback_type:FT_CALLBACK
|
|
@ -140,8 +140,9 @@ message DbRows { repeated DbRow rows = 1; }
|
|||||||
|
|
||||||
message Verification
|
message Verification
|
||||||
{
|
{
|
||||||
string v3 = 1;
|
string v3 = 1; // 加密的用户名
|
||||||
string v4 = 2;
|
string v4 = 2; // Ticket
|
||||||
|
int32 scene = 3; // 添加方式:17 名片,30 扫码
|
||||||
}
|
}
|
||||||
|
|
||||||
message AddMembers
|
message AddMembers
|
||||||
|
@ -132,8 +132,23 @@ func (c *Client) ExecDBQuery(db, sql string) []*DbRow {
|
|||||||
}
|
}
|
||||||
return recv.GetRows().GetRows()
|
return recv.GetRows().GetRows()
|
||||||
}
|
}
|
||||||
func (c *Client) AcceptFriend() int32 {
|
|
||||||
err := c.send(genFunReq(Functions_FUNC_ACCEPT_FRIEND).build())
|
/*AcceptFriend 接收好友请求
|
||||||
|
* 接收好友请求
|
||||||
|
*
|
||||||
|
* @param v3 xml.attrib["encryptusername"]
|
||||||
|
* @param v4 xml.attrib["ticket"]
|
||||||
|
*/
|
||||||
|
func (c *Client) AcceptFriend(v3, v4 string) int32 {
|
||||||
|
req := genFunReq(Functions_FUNC_ACCEPT_FRIEND)
|
||||||
|
q := Request_V{
|
||||||
|
V: &Verification{
|
||||||
|
V3: v3,
|
||||||
|
V4: v4,
|
||||||
|
}}
|
||||||
|
|
||||||
|
req.Msg = &q
|
||||||
|
err := c.send(req.build())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Err(err)
|
logs.Err(err)
|
||||||
}
|
}
|
||||||
@ -143,6 +158,59 @@ func (c *Client) AcceptFriend() int32 {
|
|||||||
}
|
}
|
||||||
return recv.GetStatus()
|
return recv.GetStatus()
|
||||||
}
|
}
|
||||||
|
func (c *Client) AddChatroomMembers(roomID, wxIDs string) int32 {
|
||||||
|
req := genFunReq(Functions_FUNC_ADD_ROOM_MEMBERS)
|
||||||
|
q := Request_M{
|
||||||
|
M: &AddMembers{Roomid: roomID, Wxids: wxIDs},
|
||||||
|
}
|
||||||
|
req.Msg = &q
|
||||||
|
err := c.send(req.build())
|
||||||
|
if err != nil {
|
||||||
|
logs.Err(err)
|
||||||
|
}
|
||||||
|
recv, err := c.Recv()
|
||||||
|
if err != nil {
|
||||||
|
logs.Err(err)
|
||||||
|
}
|
||||||
|
return recv.GetStatus()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReceiveTransfer 接收转账
|
||||||
|
func (c *Client) ReceiveTransfer(transferId, wxID string) int32 {
|
||||||
|
req := genFunReq(Functions_FUNC_RECV_TRANSFER)
|
||||||
|
q := Request_Tf{
|
||||||
|
Tf: &Transfer{Tid: transferId, Wxid: wxID},
|
||||||
|
}
|
||||||
|
req.Msg = &q
|
||||||
|
err := c.send(req.build())
|
||||||
|
if err != nil {
|
||||||
|
logs.Err(err)
|
||||||
|
}
|
||||||
|
recv, err := c.Recv()
|
||||||
|
if err != nil {
|
||||||
|
logs.Err(err)
|
||||||
|
}
|
||||||
|
return recv.GetStatus()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DecryptImage 解密图片 加密路径,解密路径
|
||||||
|
func (c *Client) DecryptImage(src, dst string) int32 {
|
||||||
|
req := genFunReq(Functions_FUNC_DECRYPT_IMAGE)
|
||||||
|
q := Request_Dec{
|
||||||
|
Dec: &DecPath{Src: src, Dst: dst},
|
||||||
|
}
|
||||||
|
req.Msg = &q
|
||||||
|
err := c.send(req.build())
|
||||||
|
if err != nil {
|
||||||
|
logs.Err(err)
|
||||||
|
}
|
||||||
|
recv, err := c.Recv()
|
||||||
|
if err != nil {
|
||||||
|
logs.Err(err)
|
||||||
|
}
|
||||||
|
return recv.GetStatus()
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Client) AddChatRoomMembers(roomId string, wxIds []string) int32 {
|
func (c *Client) AddChatRoomMembers(roomId string, wxIds []string) int32 {
|
||||||
req := genFunReq(Functions_FUNC_ADD_ROOM_MEMBERS)
|
req := genFunReq(Functions_FUNC_ADD_ROOM_MEMBERS)
|
||||||
q := Request_M{
|
q := Request_M{
|
||||||
@ -292,8 +360,8 @@ func (c *Client) OnMSG(f func(msg *WxMsg)) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
socket.SetOption(mangos.OptionRecvDeadline, 2000)
|
_ = socket.SetOption(mangos.OptionRecvDeadline, 2000)
|
||||||
socket.SetOption(mangos.OptionSendDeadline, 2000)
|
_ = socket.SetOption(mangos.OptionSendDeadline, 2000)
|
||||||
err = socket.Dial(addPort(c.add))
|
err = socket.Dial(addPort(c.add))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -305,7 +373,6 @@ func (c *Client) OnMSG(f func(msg *WxMsg)) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
logs.Info(len(recv))
|
|
||||||
_ = proto.Unmarshal(recv, msg)
|
_ = proto.Unmarshal(recv, msg)
|
||||||
go f(msg.GetWxmsg())
|
go f(msg.GetWxmsg())
|
||||||
}
|
}
|
||||||
|
596
go/wcf/wcf.pb.go
596
go/wcf/wcf.pb.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user