From af0df81a9736dcae6d009e7d2ff38907e909d510 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Tue, 6 Sep 2016 17:56:29 +0100 Subject: Fix @channel, @here and @everyone Slack import. (#3946) Does this by adding special case regexes to the @mention importing code in the Slack importer for these three special mention types. Fixes PLT-4053 --- api/slackimport.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api') diff --git a/api/slackimport.go b/api/slackimport.go index 4382e7f6d..f96a15be2 100644 --- a/api/slackimport.go +++ b/api/slackimport.go @@ -242,6 +242,11 @@ func SlackConvertUserMentions(users []SlackUser, posts map[string][]SlackPost) m regexes["@"+user.Username] = r } + // Special cases. + regexes["@here"], _ = regexp.Compile(``) + regexes["@channel"], _ = regexp.Compile("") + regexes["@all"], _ = regexp.Compile("") + for channelName, channelPosts := range posts { for postIdx, post := range channelPosts { for mention, r := range regexes { -- cgit v1.2.3-1-g7c22