From c36a6ad98438cf12091b4d98aa645222fec5a9a5 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Mon, 15 Oct 2018 09:28:53 +0800 Subject: [PATCH] Reset msg.Text back to original for each channel's message handling. --- gateway/gateway.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gateway/gateway.go b/gateway/gateway.go index 8d6c7ef0..a8adc4f5 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -332,14 +332,16 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM msg.Avatar = gw.modifyAvatar(origmsg, dest) msg.Username = gw.modifyUsername(origmsg, dest) msg.ID = "" - if (gw.Router.GTClient != nil) && (channel.Options.Locale != "") && (origmsg.Text != "") { + msg.Text = origmsg.Text + + if (gw.Router.GTClient != nil) && (channel.Options.Locale != "") && (msg.Text != "") { ctx := context.Background() client := gw.Router.GTClient defer client.Close() - text := origmsg.Text + text := msg.Text var results [][]string // colons: add temp token