make GetChannelByName take teamId first (#9134)
* make GetChannelByName take teamId first I think it is more natural to accept `teamId`, then `channelName`, given the pattern followed by other Plugin API methods and even the SQL Store itself. The App layer seems unusual in accepting `channelName` first. This also re-generates the mocks fixing the parameter order for the recently added `UserStatus` APIs. * add GetChannelByNameForTeamName
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
610ac5a53c
Коммит
908a682fcf
@@ -190,10 +190,14 @@ func (api *PluginAPI) GetChannel(channelId string) (*model.Channel, *model.AppEr
|
||||
return api.app.GetChannel(channelId)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannelByName(name, teamId string) (*model.Channel, *model.AppError) {
|
||||
func (api *PluginAPI) GetChannelByName(teamId, name string) (*model.Channel, *model.AppError) {
|
||||
return api.app.GetChannelByName(name, teamId)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetChannelByNameForTeamName(teamName, channelName string) (*model.Channel, *model.AppError) {
|
||||
return api.app.GetChannelByNameForTeamName(channelName, teamName)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError) {
|
||||
return api.app.GetDirectChannel(userId1, userId2)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user