Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 7e44bd27299f51a653103a628e309ec5c08a159c Author: Wim <wim@42.be> Date: Sun Jun 18 23:59:52 2017 +0000 Use the last (and biggest) photo to relay (telegram). Closes #184 diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 9f7af28..48ad672 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -12210 +1228 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {   }   if message.Photo != nil {   photos := *message.Photo - // photo 3 is the biggest - if len(photos) == 3 { - text = text + " " + b.getFileDirectURL(photos[2].FileID) - } + // last photo is the biggest + text = text + " " + b.getFileDirectURL(photos[len(photos)-1].FileID)   }   if message.Document != nil {   text = text + " " + message.Document.FileName + " : " + b.getFileDirectURL(message.Document.FileID)