slack: strip out dumb nbsp

This commit is contained in:
Chris Sexton 2020-05-17 09:39:42 -04:00 committed by Chris Sexton
parent 0b78b99ee9
commit 3db779567a
1 changed files with 3 additions and 0 deletions

View File

@ -413,6 +413,9 @@ func (s *SlackApp) buildMessage(m *slackevents.MessageEvent) msg.Message {
text = fixText(s.getUser, text) 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) isCmd, text := bot.IsCmd(s.config, text)
isAction := m.SubType == "me_message" isAction := m.SubType == "me_message"