Skip to content

Commit

Permalink
Reset variables each loop (telegram). Closes #181
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed May 30, 2017
1 parent c791423 commit 9bcd131
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridge/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9bcd131

Please sign in to comment.