From b199cb6c264ee4064a324257114afa559cb1463c Mon Sep 17 00:00:00 2001 From: David May <1301201+wass3r@users.noreply.github.com> Date: Wed, 22 Apr 2020 14:39:18 +0000 Subject: [PATCH] fix(channel): open up channel length (#138) --- remote/slack/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote/slack/util.go b/remote/slack/util.go index 38c398d3..2c8b4c39 100644 --- a/remote/slack/util.go +++ b/remote/slack/util.go @@ -29,7 +29,7 @@ func findKey(m map[string]string, value string) (key string, ok bool) { // getMessageType - gets the type of message based on where it came from func getMessageType(channel string) (models.MessageType, error) { - re := regexp.MustCompile(`^(C|D|G)[A-Z0-9]{8}$`) // match known 9-char channel ID types + re := regexp.MustCompile(`^(C|D|G)[A-Z0-9]{4,}$`) // match known channel ID types match := re.FindStringSubmatch(channel) if len(match) > 0 { switch match[1] { // [1] grabs the first letter, [0] will grab the entire channel ID