ソースを参照

Removed strange workaround, fixing #134

rafaeltheraven 5 年 前
コミット
c8e5c06a57
1 ファイル変更4 行追加3 行削除
  1. 4 3
      portal.go

+ 4 - 3
portal.go

@@ -987,9 +987,10 @@ func (portal *Portal) HandleMediaMessage(source *User, download func() ([]byte,
 	}
 
 	// WhatsApp sends incorrect mime types 3:<
-	if detected := http.DetectContentType(data); detected != "application/octet-stream" {
-		mimeType = detected
-	}
+	portal.log.Debugfln("Before conversion: %s", mimeType)
+	//if detected := http.DetectContentType(data); detected != "application/octet-stream" {
+	//	mimeType = detected
+	//}
 
 	// synapse doesn't handle webp well, so we convert it. This can be dropped once https://github.com/matrix-org/synapse/issues/4382 is fixed
 	if mimeType == "image/webp" {