Add support for telegram captions

This commit is contained in:
Leko 2022-02-03 03:50:19 +08:00
parent 6a7412bf2b
commit ff0bc21062
No known key found for this signature in database
GPG Key ID: 3C6C437219A25483

View File

@ -279,6 +279,10 @@ func (b *Btelegram) handleDownload(rmsg *config.Message, message *tgbotapi.Messa
text, name, url = b.getDownloadInfo(photos[len(photos)-1].FileID, "", true)
}
if message.Caption != "" {
text = message.Caption + "\n" + text
}
// if name is empty we didn't match a thing to download
if name == "" {
return nil