Fix media conversion errors not including actual error

This commit is contained in:
Tulir Asokan 2022-08-31 11:10:39 +03:00
parent 985b33fd7c
commit b923a39d76

View file

@ -2974,7 +2974,7 @@ func (portal *Portal) preprocessMatrixMedia(ctx context.Context, sender *User, r
// Everything is allowed // Everything is allowed
} }
if convertErr != nil { 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) uploadResp, err := sender.Client.Upload(ctx, data, mediaType)
if err != nil { if err != nil {