mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix typo.
This commit is contained in:
parent
383954dc11
commit
ef17b3a30d
@ -564,7 +564,7 @@ func (c *QQClient) sendGroupLongOrForwardMessage(groupCode int64, isLong bool, m
|
||||
},
|
||||
})
|
||||
for i, ip := range rsp.Uint32UpIp {
|
||||
err := c.highwayUploadImage(uint32(ip), int(rsp.Uint32UpPort[i]), rsp.MsgSig, body, 27)
|
||||
err := c.highwayUpload(uint32(ip), int(rsp.Uint32UpPort[i]), rsp.MsgSig, body, 27)
|
||||
if err == nil {
|
||||
if !isLong {
|
||||
var pv string
|
||||
@ -613,7 +613,7 @@ func (c *QQClient) UploadGroupImage(groupCode int64, img []byte) (*message.Group
|
||||
goto ok
|
||||
}
|
||||
for i, ip := range rsp.UploadIp {
|
||||
err := c.highwayUploadImage(uint32(ip), int(rsp.UploadPort[i]), rsp.UploadKey, img, 2)
|
||||
err := c.highwayUpload(uint32(ip), int(rsp.UploadPort[i]), rsp.UploadKey, img, 2)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func (c *QQClient) highwayUploadImage(ip uint32, port int, updKey, img []byte, cmdId int32) error {
|
||||
func (c *QQClient) highwayUpload(ip uint32, port int, updKey, data []byte, cmdId int32) error {
|
||||
addr := net.TCPAddr{
|
||||
IP: make([]byte, 4),
|
||||
Port: port,
|
||||
@ -27,8 +27,8 @@ func (c *QQClient) highwayUploadImage(ip uint32, port int, updKey, img []byte, c
|
||||
return err
|
||||
}
|
||||
defer conn.Close()
|
||||
h := md5.Sum(img)
|
||||
pkt := c.buildImageUploadPacket(img, updKey, cmdId, h)
|
||||
h := md5.Sum(data)
|
||||
pkt := c.buildImageUploadPacket(data, updKey, cmdId, h)
|
||||
r := binary.NewNetworkReader(conn)
|
||||
for _, p := range pkt {
|
||||
_, err = conn.Write(p)
|
||||
|
Loading…
x
Reference in New Issue
Block a user