MM-26056 Add plugin ability to execute slash command. (#14898)
* Add plugin ability to execute slash command. * A test * Add site url to command args for plugin API * Remove unessiary complexity.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b977017ca7
Коммит
bebff8156b
@@ -483,6 +483,29 @@ func (_m *API) EnablePlugin(id string) *model.AppError {
|
||||
return r0
|
||||
}
|
||||
|
||||
// ExecuteSlashCommand provides a mock function with given fields: commandArgs
|
||||
func (_m *API) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.CommandResponse, error) {
|
||||
ret := _m.Called(commandArgs)
|
||||
|
||||
var r0 *model.CommandResponse
|
||||
if rf, ok := ret.Get(0).(func(*model.CommandArgs) *model.CommandResponse); ok {
|
||||
r0 = rf(commandArgs)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.CommandResponse)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(*model.CommandArgs) error); ok {
|
||||
r1 = rf(commandArgs)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetBot provides a mock function with given fields: botUserId, includeDeleted
|
||||
func (_m *API) GetBot(botUserId string, includeDeleted bool) (*model.Bot, *model.AppError) {
|
||||
ret := _m.Called(botUserId, includeDeleted)
|
||||
|
||||
Ссылка в новой задаче
Block a user