소스 검색

Resize webp stickers if they're not 1:1

Tulir Asokan 3 년 전
부모
커밋
11abac2214
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      portal.go

+ 1 - 1
portal.go

@@ -2902,7 +2902,7 @@ func (portal *Portal) preprocessMatrixMedia(ctx context.Context, sender *User, r
 	// Allowed mime types from https://developers.facebook.com/docs/whatsapp/on-premises/reference/media
 	switch {
 	case isSticker:
-		if mimeType != "image/webp" {
+		if mimeType != "image/webp" || content.Info.Width != content.Info.Height {
 			data, convertErr = portal.convertToWebP(data)
 			content.Info.MimeType = "image/webp"
 		}