summaryrefslogtreecommitdiffstats
path: root/bridge/telegram/handlers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-01-02 00:55:20 +0100
committerGitHub <noreply@github.com>2021-01-02 00:55:20 +0100
commit16fde6935c83c21987a3cb4d65a2608ca14d0341 (patch)
treefb2be92ce2903175e43ef7da3138f1aa6a7b90bc /bridge/telegram/handlers.go
parent9592cff9fa4ae4bac5a0b2a71296a5d3063c47df (diff)
downloadmatterbridge-msglm-16fde6935c83c21987a3cb4d65a2608ca14d0341.tar.gz
matterbridge-msglm-16fde6935c83c21987a3cb4d65a2608ca14d0341.tar.bz2
matterbridge-msglm-16fde6935c83c21987a3cb4d65a2608ca14d0341.zip
Rename .oga audio files to .ogg (telegram) (#1349)
Diffstat (limited to 'bridge/telegram/handlers.go')
-rw-r--r--bridge/telegram/handlers.go5
1 files changed, 5 insertions, 0 deletions
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
}