5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 17:15:40 +00:00

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
}