mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
committed by
GitHub
parent
b977017ca7
commit
bebff8156b
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user