diff options
author | Wim <wim@42.be> | 2017-11-20 22:12:51 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-11-20 22:12:51 +0100 |
commit | 98762a02356d41857e8a474daba602e8d258d5b9 (patch) | |
tree | 2d77b2b65ea0b7e85989eafeba4b7f78f122dc76 /bridge | |
parent | 2fd1fd9573c4e297ecbc45a0be184450fb034f75 (diff) | |
download | matterbridge-msglm-98762a02356d41857e8a474daba602e8d258d5b9.tar.gz matterbridge-msglm-98762a02356d41857e8a474daba602e8d258d5b9.tar.bz2 matterbridge-msglm-98762a02356d41857e8a474daba602e8d258d5b9.zip |
Add webp extension to stickers if necessary (telegram)
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/telegram/telegram.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 5cd49253..91e2e767 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -229,6 +229,9 @@ func (b *Btelegram) handleDownload(file interface{}, msg *config.Message) { url = b.getFileDirectURL(v.FileID) urlPart := strings.Split(url, "/") name = urlPart[len(urlPart)-1] + if !strings.HasSuffix(name, ".webp") { + name = name + ".webp" + } text = " " + url fileid = v.FileID case *tgbotapi.Video: |