Add plugin slash command support (#7941)

* add plugin slash command support

* remove unused string

* rebase
Этот коммит содержится в:
Chris
2017-12-08 13:55:41 -06:00
коммит произвёл GitHub
родитель 7ed1177a2b
Коммит 4c17bdff1b
19 изменённых файлов: 561 добавлений и 39 удалений

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

@@ -30,6 +30,22 @@ func (m *API) LoadPluginConfiguration(dest interface{}) error {
return ret.Error(0)
}
func (m *API) RegisterCommand(command *model.Command) error {
ret := m.Called(command)
if f, ok := ret.Get(0).(func(*model.Command) error); ok {
return f(command)
}
return ret.Error(0)
}
func (m *API) UnregisterCommand(teamId, trigger string) error {
ret := m.Called(teamId, trigger)
if f, ok := ret.Get(0).(func(string, string) error); ok {
return f(teamId, trigger)
}
return ret.Error(0)
}
func (m *API) CreateUser(user *model.User) (*model.User, *model.AppError) {
ret := m.Called(user)
if f, ok := ret.Get(0).(func(*model.User) (*model.User, *model.AppError)); ok {