From 7469732bbc84dbb60b6eafc29fb8d0771a48ba27 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 15 Apr 2017 19:07:35 +0200 Subject: Add support for edited messages (telegram) --- bridge/telegram/telegram.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bridge') diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index d6c2f255..32269241 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -85,15 +85,17 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { if update.ChannelPost != nil { message = update.ChannelPost } - if update.EditedChannelPost != nil { + if update.EditedChannelPost != nil && !b.Config.EditDisable { message = update.EditedChannelPost + message.Text = message.Text + b.Config.EditSuffix } // handle groups if update.Message != nil { message = update.Message } - if update.EditedMessage != nil { + if update.EditedMessage != nil && !b.Config.EditDisable { message = update.EditedMessage + message.Text = message.Text + b.Config.EditSuffix } if message.From != nil { username = message.From.FirstName -- cgit v1.2.3