Thumbnail

rani/matterbridge.git

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

commit e6184136e05dc1c2b9d3e32b2d8b6d0a68c8004f Author: Wim <wim@42.be> Date: Sun Jun 18 01:23:15 2017 +0000 Sent only the biggest picture to bridges (telegram) diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index fa6975e..d6b7597 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -1218 +12110 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {   text = text + " " + b.getFileDirectURL(message.Video.FileID)   }   if message.Photo != nil { - for _, p := range *message.Photo { - text = text + " " + b.getFileDirectURL(p.FileID) + photos := *message.Photo + // photo 3 is the biggest + if len(photos) == 3 { + text = text + " " + b.getFileDirectURL(photos[2].FileID)   }   }   if message.Document != nil {