Browse Source

Fix media conversion errors not including actual error

Tulir Asokan 2 năm trước cách đây
mục cha
commit
b923a39d76
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      portal.go

+ 1 - 1
portal.go

@@ -2974,7 +2974,7 @@ func (portal *Portal) preprocessMatrixMedia(ctx context.Context, sender *User, r
 		// Everything is allowed
 	}
 	if convertErr != nil {
-		return nil, util.NewDualError(fmt.Errorf("%w (%s to %s)", errMediaConvertFailed, mimeType, content.Info.MimeType), err)
+		return nil, util.NewDualError(fmt.Errorf("%w (%s to %s)", errMediaConvertFailed, mimeType, content.Info.MimeType), convertErr)
 	}
 	uploadResp, err := sender.Client.Upload(ctx, data, mediaType)
 	if err != nil {