-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
612a50e
commit d76ed6b
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package oidb | ||
|
||
import ( | ||
"errors" | ||
"github.com/LagrangeDev/LagrangeGo/packets/pb/service/oidb" | ||
"github.com/RomiChan/protobuf/proto" | ||
) | ||
|
||
func BuildGroupPokeReq(groupUin, uin uint32) (*OidbPacket, error) { | ||
body := &oidb.OidbSvcTrpcTcp0XED3_1{ | ||
Uin: uin, | ||
GroupUin: groupUin, | ||
Ext: proto.Some[uint32](1), | ||
} | ||
return BuildOidbPacket(0xED3, 1, body, false, false) | ||
} | ||
|
||
func BuildFriendPokeReq(uin uint32) (*OidbPacket, error) { | ||
body := &oidb.OidbSvcTrpcTcp0XED3_1{ | ||
Uin: uin, | ||
FriendUin: uin, | ||
Ext: proto.Some[uint32](1), | ||
} | ||
return BuildOidbPacket(0xED3, 1, body, false, false) | ||
} | ||
|
||
func ParsePokeResp(data []byte) (bool, error) { | ||
baseResp, err := ParseOidbPacket(data, nil) | ||
if err != nil { | ||
return false, err | ||
} | ||
if baseResp.ErrorCode != 0 { | ||
return false, errors.New(baseResp.ErrorMsg) | ||
} | ||
return true, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Sequence":8901,"Tgtgt":"BCCgSr6jXSS152VX5gzPBg==","Tgt":"ZwhpAHI0+IXnOyM7aWaI3pDfv+bG6d5fcstsiv+vVf5rc0hLYe7gn+lQZqKthqxUSnzn7+yr+dFDaXXKAV3DBOGCObNyA7OZ","D2":"6Eh025S5eIYgXBjgjHNux4g3dGUlQ6Qyypk2OOTVScgd8s/tZp3Mn0ShgsGUP6ohRSIwqZ/xt2JhzoNPjfoLRdvv8hc4e9YVxGCdc5R6BqlIZCfzVMB1gA==","D2Key":"NCw0QlZTOz8ocyhhJGcrZQ==","Qrsig":"KR3P4aJXvxWdcLD4kqqlKUmYo0yuTKEt","ExchangeKey":"1koG+MOC7P4pmDUj6mSmdhFG5QY0Y3gvNdxJemI35OM=","KeySig":"fj/L9A1bgXBhqB4Iqr5J93WeI/lDA+7T0I/OlBRqUsUlHfcFkRpdtU17xRb3jCM39uKUOHHNagPdY0IN1wTPmXdB8usSCyOorDF9iIfgi74hKaKfRwxhIOzpkkjhx7TX5Vtkqk8H1OQ=","Cookies":"","UnusualSig":"","TempPwd":"xDR7IgZSkKRTCq8qu4x5wAWmnQHsEtl7mDNADqdJ5StFll5LLWumxfpFgh8s6CbZmIu4iHuRV2OTCrkWyehkZj7VMnJaP040VhRs890kNxOuekyKNhAt7XgCIT65TmI+zgNvFEC7WWfVYtYaxO559aU6QAug8YaUzjRU/u8n17jL991BWiyBRjJ7IQq6eGBuutCHHM2Q/nM=","Uid":"u_T0WhBZchiZhEUIbSxoocGA","CaptchaInfo":["","",""]} |