mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-25 23:41:35 +00: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 {
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user