From 98762a02356d41857e8a474daba602e8d258d5b9 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 20 Nov 2017 22:12:51 +0100 Subject: Add webp extension to stickers if necessary (telegram) --- bridge/telegram/telegram.go | 3 +++ 1 file changed, 3 insertions(+) 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: -- cgit v1.2.3