From ff0bc210628a3751020d5e80cd00cbe2e3862393 Mon Sep 17 00:00:00 2001 From: Leko Date: Thu, 3 Feb 2022 03:50:19 +0800 Subject: [PATCH] Add support for telegram captions --- bridge/telegram/handlers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go index 80a7185c..c75cb2c3 100644 --- a/bridge/telegram/handlers.go +++ b/bridge/telegram/handlers.go @@ -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