diff options
author | Wim <wim@42.be> | 2017-07-04 01:34:02 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-07-04 01:35:30 +0200 |
commit | 2338c69d402ad3779f4e2a2f38ac800ceca656b9 (patch) | |
tree | 9d3d5faf5ab5cba0c1f02a3ca940d87f7367155a /bridge/telegram | |
parent | c714501a0e79f96d69f34b5584e3ce0a25efd54b (diff) | |
download | matterbridge-msglm-2338c69d402ad3779f4e2a2f38ac800ceca656b9.tar.gz matterbridge-msglm-2338c69d402ad3779f4e2a2f38ac800ceca656b9.tar.bz2 matterbridge-msglm-2338c69d402ad3779f4e2a2f38ac800ceca656b9.zip |
Add UseInsecureURL option (telegram)
Diffstat (limited to 'bridge/telegram')
-rw-r--r-- | bridge/telegram/telegram.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 48ad672a..ce43b344 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -114,18 +114,18 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { if username == "" { username = "unknown" } - if message.Sticker != nil { + if message.Sticker != nil && b.Config.UseInsecureURL { text = text + " " + b.getFileDirectURL(message.Sticker.FileID) } - if message.Video != nil { + if message.Video != nil && b.Config.UseInsecureURL { text = text + " " + b.getFileDirectURL(message.Video.FileID) } - if message.Photo != nil { + if message.Photo != nil && b.Config.UseInsecureURL { photos := *message.Photo // last photo is the biggest text = text + " " + b.getFileDirectURL(photos[len(photos)-1].FileID) } - if message.Document != nil { + if message.Document != nil && b.Config.UseInsecureURL { text = text + " " + message.Document.FileName + " : " + b.getFileDirectURL(message.Document.FileID) } if text != "" { |