slack: once more, remove a character

This commit is contained in:
Chris Sexton 2020-10-21 14:20:19 -04:00 committed by Chris Sexton
parent ced2108f31
commit b978702706
2 changed files with 2 additions and 1 deletions

View File

@ -421,6 +421,7 @@ func (s *SlackApp) buildMessage(m *slackevents.MessageEvent) msg.Message {
// Slack likes to put these NBSP in and it screws with matching later // Slack likes to put these NBSP in and it screws with matching later
text = strings.ReplaceAll(text, "\u00a0", " ") text = strings.ReplaceAll(text, "\u00a0", " ")
text = strings.ReplaceAll(text, "\ufe0f", "")
text = zerowidth.RemoveZeroWidthCharacters(text) text = zerowidth.RemoveZeroWidthCharacters(text)
isCmd, text := bot.IsCmd(s.config, text) isCmd, text := bot.IsCmd(s.config, text)

2
go.mod
View File

@ -54,7 +54,7 @@ require (
github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.4.0 github.com/stretchr/testify v1.4.0
github.com/temoto/robotstxt v1.1.1 // indirect github.com/temoto/robotstxt v1.1.1 // indirect
github.com/trubitsyn/go-zero-width v1.0.1 // indirect github.com/trubitsyn/go-zero-width v1.0.1
github.com/ttacon/builder v0.0.0-20170518171403-c099f663e1c2 // indirect github.com/ttacon/builder v0.0.0-20170518171403-c099f663e1c2 // indirect
github.com/ttacon/libphonenumber v1.1.0 // indirect github.com/ttacon/libphonenumber v1.1.0 // indirect
github.com/velour/chat v0.0.0-20180713122344-fd1d1606cb89 github.com/velour/chat v0.0.0-20180713122344-fd1d1606cb89