Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 无法上传群文件 #2501

Open
4 tasks done
kkgg0521 opened this issue Dec 13, 2023 · 4 comments
Open
4 tasks done

[Bug]: 无法上传群文件 #2501

kkgg0521 opened this issue Dec 13, 2023 · 4 comments
Labels
bug? The issue author think this is a bug

Comments

@kkgg0521
Copy link

请确保您已阅读以上注意事项,并勾选下方的确认框。

  • 我已经仔细阅读上述教程和 "提问前需知"
  • 我已经使用 dev分支版本 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)

go-cqhttp 版本

v1.2.0

运行环境

Windows (64)

运行架构

x86

连接方式

HTTP

使用协议

2 | Android Watch

重现步骤

无法上传群文件,以下带代码中的t 等于1的情况 无法获取到上传群文件的host
`// ConfigPushSvc.PushReq
func decodePushReqPacket(c *QQClient, pkt *network.Packet) (any, error) {

request := &jce.RequestPacket{}
request.ReadFrom(jce.NewJceReader(pkt.Payload))
data := &jce.RequestDataVersion2{}
data.ReadFrom(jce.NewJceReader(request.SBuffer))
r := jce.NewJceReader(data.Map["PushReq"]["ConfigPush.PushReq"][1:])
t := r.ReadInt32(1)

jceBuf := r.ReadBytes(2)
if len(jceBuf) > 0 {
	switch t {
	case 1:
		ssoPkt := jce.NewJceReader(jceBuf)
		servers := ssoPkt.ReadSsoServerInfos(1)
		if len(servers) > 0 {
			var adds []netip.AddrPort
			for _, s := range servers {
				if strings.Contains(s.Server, "com") {
					continue
				}
				c.debug("got new server addr: %v location: %v", s.Server, s.Location)
				addr, err := netip.ParseAddr(s.Server)
				if err == nil {
					adds = append(adds, netip.AddrPortFrom(addr, uint16(s.Port)))
				}
			}
			f := true
			for _, e := range c.eventHandlers.serverUpdatedHandlers {
				cover(func() {
					if !e(c, &ServerUpdatedEvent{Servers: servers}) {
						f = false
					}
				})
			}
			if f {
				c.SetCustomServer(adds)
			}
			return nil, nil
		}
	case 2:
		fmtPkt := jce.NewJceReader(jceBuf)
		list := &jce.FileStoragePushFSSvcList{}
		list.ReadFrom(fmtPkt)
		c.debug("got file storage svc push.")
		// c.fileStorageInfo = list
		rsp := cmd0x6ff.C501RspBody{}
		if err := proto.Unmarshal(list.BigDataChannel.PbBuf, &rsp); err == nil && rsp.RspBody != nil {
			c.highwaySession.SigSession = rsp.RspBody.SigSession
			c.highwaySession.SessionKey = rsp.RspBody.SessionKey
			for _, srv := range rsp.RspBody.Addrs {
				if srv.ServiceType.Unwrap() == 10 {
					for _, addr := range srv.Addrs {
						c.highwaySession.AppendAddr(addr.Ip.Unwrap(), addr.Port.Unwrap())
					}
				}
				/*
					if srv.ServiceType.Unwrap() == 21 {
						for _, addr := range srv.Addrs {
							c.otherSrvAddrs = append(c.otherSrvAddrs, fmt.Sprintf("%v:%v", binary.UInt32ToIPV4Address(addr.Ip.Unwrap()), addr.Port.Unwrap()))
						}
					}

				*/
			}
		}
	}
}

seq := r.ReadInt64(3)
_, resp := c.buildConfPushRespPacket(t, seq, jceBuf)
return nil, c.sendPacket(resp)

}`

期望的结果是什么?

上传群文件没问题

实际的结果是什么?

无效果

简单的复现代码/链接(可选)

No response

日志记录(可选)

No response

补充说明(可选)

No response

@kkgg0521 kkgg0521 added the bug? The issue author think this is a bug label Dec 13, 2023
@plwd2022
Copy link

同上,问题在我这里也存在。

@kkgg0521
Copy link
Author

同上,问题在我这里也存在。

有解决方案了么

@jiangyin14
Copy link

我猜是watch协议的问题?watch有群文件功能吗

@SinKingCloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? The issue author think this is a bug
Projects
None yet
Development

No branches or pull requests

4 participants