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
@@ -339,7 +339,7 @@ func createDirectChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
sc, err := c.App.CreateDirectChannel(userIds[0], userIds[1])
|
||||
sc, err := c.App.GetOrCreateDirectChannel(userIds[0], userIds[1])
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user