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
Этот коммит содержится в:
George Goldberg
2016-09-06 17:56:29 +01:00
коммит произвёл Joram Wilander
родитель 856ae2901b
Коммит af0df81a97

Просмотреть файл

@@ -242,6 +242,11 @@ func SlackConvertUserMentions(users []SlackUser, posts map[string][]SlackPost) m
regexes["@"+user.Username] = r
}
// Special cases.
regexes["@here"], _ = regexp.Compile(`<!here\|@here>`)
regexes["@channel"], _ = regexp.Compile("<!channel>")
regexes["@all"], _ = regexp.Compile("<!everyone>")
for channelName, channelPosts := range posts {
for postIdx, post := range channelPosts {
for mention, r := range regexes {