Correctly import Slack topic and purpose. (#4152)

In order to maintain consistency with how topic and purpose are used in
Slack, the mapping is as follows:

Slack   -> Mattermost
=====      ==========
Purpose -> Purpose
Topic   -> Header
Этот коммит содержится в:
George Goldberg
2016-10-05 13:14:36 +01:00
коммит произвёл Joram Wilander
родитель 816a738d28
Коммит cd5bf7cb5a

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

@@ -22,6 +22,7 @@ type SlackChannel struct {
Name string `json:"name"`
Members []string `json:"members"`
Topic map[string]string `json:"topic"`
Purpose map[string]string `json:"purpose"`
}
type SlackUser struct {
@@ -242,7 +243,8 @@ func SlackAddChannels(teamId string, slackchannels []SlackChannel, posts map[str
Type: model.CHANNEL_OPEN,
DisplayName: sChannel.Name,
Name: SlackConvertChannelName(sChannel.Name),
Purpose: sChannel.Topic["value"],
Purpose: sChannel.Purpose["value"],
Header: sChannel.Topic["value"],
}
mChannel := ImportChannel(&newChannel)
if mChannel == nil {