From 4c17bdff1bb871fb31520b7b547f584c53ed854f Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 8 Dec 2017 13:55:41 -0600 Subject: Add plugin slash command support (#7941) * add plugin slash command support * remove unused string * rebase --- plugin/hooks.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugin/hooks.go') 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) } -- cgit v1.2.3-1-g7c22