mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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
This commit is contained in:
committed by
GitHub
parent
09eae76c00
commit
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.
|
||||
|
||||
Reference in New Issue
Block a user