Refactor Get/Create Direct Channel into one function (#9867)
* refactor GetDirectChannel and CreateDirectChannel in one function * remove CreateDirectChannel plugin api and update GetDirectChannel and GetGroupChannel plugin api * update tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
09eae76c00
Коммит
1bcf08aa4b
@@ -52,11 +52,6 @@ type API interface {
|
||||
// CreateUser creates a user.
|
||||
CreateUser(user *model.User) (*model.User, *model.AppError)
|
||||
|
||||
// CreateDirectChannel creates a Direct channel.
|
||||
//
|
||||
// Minimum server version: 5.6
|
||||
CreateDirectChannel(userId1 string, userId2 string) (*model.Channel, *model.AppError)
|
||||
|
||||
// DeleteUser deletes a user.
|
||||
DeleteUser(userId string) *model.AppError
|
||||
|
||||
@@ -196,9 +191,11 @@ type API interface {
|
||||
GetChannelStats(channelId string) (*model.ChannelStats, *model.AppError)
|
||||
|
||||
// GetDirectChannel gets a direct message channel.
|
||||
// If the channel does not exist it will create it.
|
||||
GetDirectChannel(userId1, userId2 string) (*model.Channel, *model.AppError)
|
||||
|
||||
// GetGroupChannel gets a group message channel.
|
||||
// If the channel does not exist it will create it.
|
||||
GetGroupChannel(userIds []string) (*model.Channel, *model.AppError)
|
||||
|
||||
// UpdateChannel updates a channel.
|
||||
|
||||
Ссылка в новой задаче
Block a user