summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-06-18 01:23:15 +0200
committerWim <wim@42.be>2017-06-18 01:23:15 +0200
commit2dd402675d774eec8a3d4b062afb6a5eaf6f884c (patch)
tree6ab2dbdba834528ae006a99e20b9cc6ce131607c /bridge
parent25b1af1e110afc72630027b8957f3bdaedfa943f (diff)
downloadmatterbridge-msglm-2dd402675d774eec8a3d4b062afb6a5eaf6f884c.tar.gz
matterbridge-msglm-2dd402675d774eec8a3d4b062afb6a5eaf6f884c.tar.bz2
matterbridge-msglm-2dd402675d774eec8a3d4b062afb6a5eaf6f884c.zip
Sent only the biggest picture to bridges (telegram)
Diffstat (limited to 'bridge')
-rw-r--r--bridge/telegram/telegram.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index fa6975ee..d6b7597a 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -121,8 +121,10 @@ 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 {