From 4c1ddcff10b359baf5728b334acb60cc3e1b1123 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Fri, 6 Jul 2018 06:07:09 -0700 Subject: MM-10703 Adding blank request context to plugin hooks for future use. (#9043) * Adding blank request context to plugin hooks for future use. * Rename RequestContext to Context * Adding context to ServeHTTP and ExecuteCommand * Fixing import cycle in test. --- app/plugin_commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/plugin_commands.go') diff --git a/app/plugin_commands.go b/app/plugin_commands.go index 0f361f410..060defc86 100644 --- a/app/plugin_commands.go +++ b/app/plugin_commands.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/mattermost/mattermost-server/model" + "github.com/mattermost/mattermost-server/plugin" ) type PluginCommand struct { @@ -104,7 +105,7 @@ func (a *App) ExecutePluginCommand(args *model.CommandArgs) (*model.Command, *mo if err != nil { return pc.Command, nil, model.NewAppError("ExecutePluginCommand", "model.plugin_command.error.app_error", nil, "err="+err.Error(), http.StatusInternalServerError) } - response, appErr := pluginHooks.ExecuteCommand(args) + response, appErr := pluginHooks.ExecuteCommand(plugin.NewBlankContext(), args) return pc.Command, response, appErr } } -- cgit v1.2.3-1-g7c22