forked from lug/matterbridge
		
	Rename jfif to jpg (whatsapp). Fixes #1292
This commit is contained in:
		@@ -170,6 +170,11 @@ func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// rename .jfif to .jpg https://github.com/42wim/matterbridge/issues/1292
 | 
			
		||||
	if fileExt[0] == ".jfif" {
 | 
			
		||||
		fileExt[0] = ".jpg"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0])
 | 
			
		||||
 | 
			
		||||
	b.Log.Debugf("Trying to download %s with type %s", filename, message.Type)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user