From 9bcd131e66036afff8a8b8202da46f0f69295935 Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 30 May 2017 21:14:03 +0200 Subject: [PATCH] Reset variables each loop (telegram). Closes #181 --- bridge/telegram/telegram.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 8631f2f9..b0224347 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -76,11 +76,11 @@ func (b *Btelegram) Send(msg config.Message) error { } func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { - username := "" - text := "" - channel := "" for update := range updates { var message *tgbotapi.Message + username := "" + channel := "" + text := "" // handle channels if update.ChannelPost != nil { message = update.ChannelPost