diff --git a/client/ptt.go b/client/ptt.go index 6ea82280..3521b9aa 100644 --- a/client/ptt.go +++ b/client/ptt.go @@ -156,7 +156,7 @@ func (c *QQClient) UploadShortVideo(target message.Source, video, thumb io.ReadS cmd = 89 } ext, _ := proto.Marshal(c.buildPttShortVideoProto(target, videoSum, thumbSum, videoLen, thumbLen).PttShortVideoUploadReq) - combined := utils.MultiReadSeeker(thumb, video) + combined := io.MultiReader(thumb, video) input := highway.Transaction{ CommandID: cmd, Body: combined, diff --git a/utils/sys.go b/utils/sys.go index cdd8b69b..b3b11654 100644 --- a/utils/sys.go +++ b/utils/sys.go @@ -23,7 +23,7 @@ func (r *multiReadSeeker) Read(p []byte) (int, error) { readers := make([]io.Reader, len(r.readers)) for i := range r.readers { _, _ = r.readers[i].Seek(0, io.SeekStart) - readers = append(readers, r.readers[i]) + readers[i] = r.readers[i] } r.multiReader = io.MultiReader(readers...) }