mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-27 21:22:03 -08:00
Use the last (and biggest) photo to relay (telegram). Closes #184
This commit is contained in:
parent
2ddc4f7ae9
commit
62e9de1a3b
@ -122,10 +122,8 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
|||||||
}
|
}
|
||||||
if message.Photo != nil {
|
if message.Photo != nil {
|
||||||
photos := *message.Photo
|
photos := *message.Photo
|
||||||
// photo 3 is the biggest
|
// last photo is the biggest
|
||||||
if len(photos) == 3 {
|
text = text + " " + b.getFileDirectURL(photos[len(photos)-1].FileID)
|
||||||
text = text + " " + b.getFileDirectURL(photos[2].FileID)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if message.Document != nil {
|
if message.Document != nil {
|
||||||
text = text + " " + message.Document.FileName + " : " + b.getFileDirectURL(message.Document.FileID)
|
text = text + " " + message.Document.FileName + " : " + b.getFileDirectURL(message.Document.FileID)
|
||||||
|
Loading…
Reference in New Issue
Block a user