From 16fde6935c83c21987a3cb4d65a2608ca14d0341 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 2 Jan 2021 00:55:20 +0100 Subject: Rename .oga audio files to .ogg (telegram) (#1349) --- bridge/telegram/handlers.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bridge/telegram/handlers.go') diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go index ee087524..f1581a58 100644 --- a/bridge/telegram/handlers.go +++ b/bridge/telegram/handlers.go @@ -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 } -- cgit v1.2.3