From afe8fc6ecd20ce53eb199314df1a0c1e347ef3ff Mon Sep 17 00:00:00 2001
From: benjamin <ben@elixxir.io>
Date: Tue, 25 Oct 2022 21:56:56 -0700
Subject: [PATCH] disabled the emoji check

---
 channels/emoji.go      | 15 +++++++--------
 channels/emoji_test.go | 24 +++++++++++++++++++++---
 2 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/channels/emoji.go b/channels/emoji.go
index 71c7ae4f6..bb9250601 100644
--- a/channels/emoji.go
+++ b/channels/emoji.go
@@ -8,7 +8,6 @@
 package channels
 
 import (
-	"bytes"
 	"regexp"
 )
 
@@ -26,12 +25,12 @@ func ValidateReaction(reaction string) error {
 		return InvalidReaction
 	}
 
-	reader := bytes.NewReader([]byte(reaction))
-
-	// make sure it has emojis
-	if !compiledFindEmoji.MatchReader(reader) {
-		return InvalidReaction
-	}
-
+	/*
+		reader := bytes.NewReader([]byte(reaction))
+			// make sure it has emojis
+			if !compiledFindEmoji.MatchReader(reader) {
+				return InvalidReaction
+			}
+	*/
 	return nil
 }
diff --git a/channels/emoji_test.go b/channels/emoji_test.go
index d320b05a6..ea0f2a3ba 100644
--- a/channels/emoji_test.go
+++ b/channels/emoji_test.go
@@ -7,10 +7,9 @@
 
 package channels
 
-import (
-	"testing"
-)
+import "testing"
 
+/*
 func TestValidateReaction(t *testing.T) {
 
 	testReactions := []string{"🍆", "😂", "❤", "🤣", "👍", "😭", "🙏", "😘", "🥰",
@@ -25,6 +24,25 @@ func TestValidateReaction(t *testing.T) {
 		InvalidReaction, InvalidReaction, InvalidReaction, InvalidReaction,
 		InvalidReaction, InvalidReaction, InvalidReaction, InvalidReaction}
 
+	for i, r := range testReactions {
+		err := ValidateReaction(r)
+		if err != expected[i] {
+			t.Errorf("Got incorrect response for `%s` (%d): "+
+				"`%s` vs `%s`", r, i, err, expected[i])
+		}
+	}
+}*/
+
+func TestValidateReaction(t *testing.T) {
+
+	testReactions := []string{"🍆", "😂", "❤", "🤣", "👍", "😭", "🙏", "😘", "🥰",
+		"😍", "😊", "☺", "A", "b", "AA", "1", "🍆🍆", "🍆A", "👍👍👍", "👍😘A"}
+
+	expected := []error{
+		nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
+		nil, nil, InvalidReaction, nil,
+		InvalidReaction, InvalidReaction, InvalidReaction, InvalidReaction}
+
 	for i, r := range testReactions {
 		err := ValidateReaction(r)
 		if err != expected[i] {
-- 
GitLab