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 --- app/plugin_api.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/plugin_api.go') diff --git a/app/plugin_api.go b/app/plugin_api.go index 9965f770a..21b828368 100644 --- a/app/plugin_api.go +++ b/app/plugin_api.go @@ -34,6 +34,15 @@ func (api *PluginAPI) LoadPluginConfiguration(dest interface{}) error { } } +func (api *PluginAPI) RegisterCommand(command *model.Command) error { + return api.app.RegisterPluginCommand(api.id, command) +} + +func (api *PluginAPI) UnregisterCommand(teamId, trigger string) error { + api.app.UnregisterPluginCommand(api.id, teamId, trigger) + return nil +} + func (api *PluginAPI) CreateTeam(team *model.Team) (*model.Team, *model.AppError) { return api.app.CreateTeam(team) } -- cgit v1.2.3-1-g7c22