소스 검색

Merge pull request #135 from Rafaeltheraven/master

Fix #134, let whatsapp deal with mimetypes
Tulir Asokan 5 년 전
부모
커밋
39e46833b4
1개의 변경된 파일0개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      portal.go

+ 0 - 5
portal.go

@@ -986,11 +986,6 @@ func (portal *Portal) HandleMediaMessage(source *User, download func() ([]byte,
 		return
 	}
 
-	// WhatsApp sends incorrect mime types 3:<
-	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" {
 		img, err := webp.Decode(bytes.NewReader(data))