Rename .oga audio files to .ogg (telegram) (#1349)

This commit is contained in:
Wim 2021-01-02 00:55:20 +01:00 committed by GitHub
parent 9592cff9fa
commit 16fde6935c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,6 +311,11 @@ func (b *Btelegram) handleDownload(rmsg *config.Message, message *tgbotapi.Messa
b.maybeConvertWebp(&name, data)
}
// rename .oga to .ogg https://github.com/42wim/matterbridge/issues/906#issuecomment-741793512
if strings.HasSuffix(name, ".oga") && message.Audio != nil {
name = strings.Replace(name, ".oga", ".ogg", 1)
}
helper.HandleDownloadData(b.Log, rmsg, name, message.Caption, "", data, b.General)
return nil
}