summaryrefslogtreecommitdiffstats
path: root/plugin/hooks.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-12-08 13:55:41 -0600
committerGitHub <noreply@github.com>2017-12-08 13:55:41 -0600
commit4c17bdff1bb871fb31520b7b547f584c53ed854f (patch)
treeedf1e3295d6ff7d67281efc585b2e913b4efda3d /plugin/hooks.go
parent7ed1177a2b676aa4c93515268642c855cfe57a37 (diff)
downloadchat-4c17bdff1bb871fb31520b7b547f584c53ed854f.tar.gz
chat-4c17bdff1bb871fb31520b7b547f584c53ed854f.tar.bz2
chat-4c17bdff1bb871fb31520b7b547f584c53ed854f.zip
Add plugin slash command support (#7941)
* add plugin slash command support * remove unused string * rebase
Diffstat (limited to 'plugin/hooks.go')
-rw-r--r--plugin/hooks.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/hooks.go b/plugin/hooks.go
index 04d5c7c14..814609e8c 100644
--- a/plugin/hooks.go
+++ b/plugin/hooks.go
@@ -5,6 +5,8 @@ package plugin
import (
"net/http"
+
+ "github.com/mattermost/mattermost-server/model"
)
// Methods from the Hooks interface can be used by a plugin to respond to events. Methods are likely
@@ -30,4 +32,8 @@ type Hooks interface {
// The Mattermost-User-Id header will be present if (and only if) the request is by an
// authenticated user.
ServeHTTP(http.ResponseWriter, *http.Request)
+
+ // ExecuteCommand executes a command that has been previously registered via the RegisterCommand
+ // API.
+ ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
}