From adb0eb9f45eb6a723b035bda47043472f0050354 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Tue, 22 Jan 2019 10:59:08 -0500 Subject: [PATCH] emojify: add direct eq --- plugins/emojifyme/emojifyme.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/emojifyme/emojifyme.go b/plugins/emojifyme/emojifyme.go index e7d244a..26b5b72 100644 --- a/plugins/emojifyme/emojifyme.go +++ b/plugins/emojifyme/emojifyme.go @@ -78,7 +78,8 @@ func (p *EmojifyMePlugin) Message(message msg.Message) bool { for _, c := range candidates { if strings.Contains(msg, " "+c+" ") || strings.HasPrefix(msg, c+" ") || - strings.HasSuffix(msg, " "+c) { + strings.HasSuffix(msg, " "+c) || + msg == c { emojys = append(emojys, v) if !stringsContain(inertTokens, k) && len(v) > 2 { emojied += 1