Skip to content

Commit

Permalink
Add support for telegram captions
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoOwO committed Feb 2, 2022
1 parent 6a7412b commit ff0bc21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridge/telegram/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff0bc21

Please sign in to comment.