From 3db779567a19e5db2a51c7dfa2920fc56f68e9eb Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sun, 17 May 2020 09:39:42 -0400 Subject: [PATCH] slack: strip out dumb nbsp --- connectors/slackapp/slackApp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connectors/slackapp/slackApp.go b/connectors/slackapp/slackApp.go index dca6b2c..979552d 100644 --- a/connectors/slackapp/slackApp.go +++ b/connectors/slackapp/slackApp.go @@ -413,6 +413,9 @@ func (s *SlackApp) buildMessage(m *slackevents.MessageEvent) msg.Message { text = fixText(s.getUser, text) + // Slack likes to put these NBSP in and it screws with matching later + text = strings.ReplaceAll(text, "\u00a0", " ") + isCmd, text := bot.IsCmd(s.config, text) isAction := m.SubType == "me_message"