summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/telegram/telegram.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index 9f7af284..48ad672a 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -122,10 +122,8 @@ 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)