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.
This commit is contained in:
Christopher Speller
2020-07-07 09:31:03 -07:00
committed by GitHub
parent b977017ca7
commit bebff8156b
6 changed files with 102 additions and 0 deletions

View File

@@ -49,6 +49,13 @@ func (api *apiTimerLayer) UnregisterCommand(teamId, trigger string) error {
return _returnsA
}
func (api *apiTimerLayer) ExecuteSlashCommand(commandArgs *model.CommandArgs) (*model.CommandResponse, error) {
startTime := timePkg.Now()
_returnsA, _returnsB := api.apiImpl.ExecuteSlashCommand(commandArgs)
api.recordTime(startTime, "ExecuteSlashCommand", _returnsB == nil)
return _returnsA, _returnsB
}
func (api *apiTimerLayer) GetSession(sessionId string) (*model.Session, *model.AppError) {
startTime := timePkg.Now()
_returnsA, _returnsB := api.apiImpl.GetSession(sessionId)