MM-21357: Use typed constant for channel types (#17928)
* MM-21357: Use typed constant for channel types https://mattermost.atlassian.net/browse/MM-21357 ```release-note - Introduced a new type ChannelType for all channel types. - Updated the Client4.UpdateChannelPrivacy method to ChannelType. ``` * Address review comments ```release-note NONE ``` * telemetry fix ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
Claudio Costa
родитель
4968657651
Коммит
da7d71ccf7
@@ -7,10 +7,11 @@ import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
"github.com/mattermost/mattermost-server/v5/shared/mlog"
|
||||
)
|
||||
|
||||
func slackParseChannels(data io.Reader, channelType string) ([]slackChannel, error) {
|
||||
func slackParseChannels(data io.Reader, channelType model.ChannelType) ([]slackChannel, error) {
|
||||
decoder := json.NewDecoder(data)
|
||||
|
||||
var channels []slackChannel
|
||||
|
||||
@@ -31,7 +31,7 @@ type slackChannel struct {
|
||||
Members []string `json:"members"`
|
||||
Purpose slackChannelSub `json:"purpose"`
|
||||
Topic slackChannelSub `json:"topic"`
|
||||
Type string
|
||||
Type model.ChannelType
|
||||
}
|
||||
|
||||
type slackChannelSub struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user