1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix sign packet error (#278)

* fix sign packet error

* Update sign.go
This commit is contained in:
synodriver 2022-06-19 15:18:41 +08:00 committed by GitHub
parent 9b6c4ddf2f
commit c92096e7ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,19 +9,18 @@ import (
// SendGroupSign 发送群聊打卡消息 // SendGroupSign 发送群聊打卡消息
func (c *QQClient) SendGroupSign(target int64) { func (c *QQClient) SendGroupSign(target int64) {
_, _ = c.sendAndWait(c.buildGroupSignPacket(target, 0)) _, _ = c.sendAndWait(c.buildGroupSignPacket(target))
} }
func (c *QQClient) buildGroupSignPacket(groupId int64, scene uint32) (uint16, []byte) { func (c *QQClient) buildGroupSignPacket(groupId int64) (uint16, []byte) {
body := &oidb.DEB7ReqBody{ body := &oidb.DEB7ReqBody{
SignInStatusReq: &oidb.StSignInStatusReq{ SignInWriteReq: &oidb.StSignInWriteReq{
Uid: proto.Some(strconv.Itoa(int(c.Uin))), Uid: proto.Some(strconv.Itoa(int(c.Uin))),
GroupId: proto.Some(strconv.Itoa(int(groupId))), GroupId: proto.Some(strconv.Itoa(int(groupId))),
Scene: proto.Some(scene), ClientVersion: proto.Some("8.5.0"),
ClientVersion: proto.Some("8.5.0.5025"),
}, },
} }
b, _ := proto.Marshal(body) b, _ := proto.Marshal(body)
payload := c.packOIDBPackage(3767, 0, b) payload := c.packOIDBPackage(3767, 1, b)
return c.uniPacket("OidbSvc.0xeb7", payload) return c.uniPacket("OidbSvc.0xeb7", payload)
} }