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
@@ -3942,7 +3942,7 @@ func groupTestAdminRoleGroupsForSyncableMemberTeam(t *testing.T, ss store.Store)
|
||||
team := &model.Team{
|
||||
DisplayName: "A Name",
|
||||
Name: "zz" + model.NewId(),
|
||||
Type: model.ChannelTypeOpen,
|
||||
Type: model.TeamOpen,
|
||||
}
|
||||
team, nErr := ss.Team().Save(team)
|
||||
require.NoError(t, nErr)
|
||||
@@ -4045,7 +4045,7 @@ func groupTestPermittedSyncableAdminsTeam(t *testing.T, ss store.Store) {
|
||||
team := &model.Team{
|
||||
DisplayName: "A Name",
|
||||
Name: "zz" + model.NewId(),
|
||||
Type: model.ChannelTypeOpen,
|
||||
Type: model.TeamOpen,
|
||||
}
|
||||
team, nErr := ss.Team().Save(team)
|
||||
require.NoError(t, nErr)
|
||||
|
||||
@@ -40,18 +40,18 @@ func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamID string, channelType str
|
||||
}
|
||||
|
||||
// AnalyticsTypeCount provides a mock function with given fields: teamID, channelType
|
||||
func (_m *ChannelStore) AnalyticsTypeCount(teamID string, channelType string) (int64, error) {
|
||||
func (_m *ChannelStore) AnalyticsTypeCount(teamID string, channelType model.ChannelType) (int64, error) {
|
||||
ret := _m.Called(teamID, channelType)
|
||||
|
||||
var r0 int64
|
||||
if rf, ok := ret.Get(0).(func(string, string) int64); ok {
|
||||
if rf, ok := ret.Get(0).(func(string, model.ChannelType) int64); ok {
|
||||
r0 = rf(teamID, channelType)
|
||||
} else {
|
||||
r0 = ret.Get(0).(int64)
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
if rf, ok := ret.Get(1).(func(string, model.ChannelType) error); ok {
|
||||
r1 = rf(teamID, channelType)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
|
||||
Ссылка в новой задаче
Block a user