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
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2018-11-28 18:01:49 +01:00
коммит произвёл GitHub
родитель 09eae76c00
Коммит 1bcf08aa4b
18 изменённых файлов: 241 добавлений и 402 удалений

Просмотреть файл

@@ -41,7 +41,7 @@ func TestSendNotifications(t *testing.T) {
t.Fatal("user should have been mentioned")
}
dm, err := th.App.CreateDirectChannel(th.BasicUser.Id, th.BasicUser2.Id)
dm, err := th.App.GetOrCreateDirectChannel(th.BasicUser.Id, th.BasicUser2.Id)
if err != nil {
t.Fatal(err)
}