mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-19 09:32:35 +01:00
Add webp extension to stickers if necessary (telegram)
This commit is contained in:
parent
2fd1fd9573
commit
98762a0235
@ -229,6 +229,9 @@ func (b *Btelegram) handleDownload(file interface{}, msg *config.Message) {
|
|||||||
url = b.getFileDirectURL(v.FileID)
|
url = b.getFileDirectURL(v.FileID)
|
||||||
urlPart := strings.Split(url, "/")
|
urlPart := strings.Split(url, "/")
|
||||||
name = urlPart[len(urlPart)-1]
|
name = urlPart[len(urlPart)-1]
|
||||||
|
if !strings.HasSuffix(name, ".webp") {
|
||||||
|
name = name + ".webp"
|
||||||
|
}
|
||||||
text = " " + url
|
text = " " + url
|
||||||
fileid = v.FileID
|
fileid = v.FileID
|
||||||
case *tgbotapi.Video:
|
case *tgbotapi.Video:
|
||||||
|
Loading…
Reference in New Issue
Block a user