diff options
author | Chris <ccbrown112@gmail.com> | 2017-12-08 13:55:41 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 13:55:41 -0600 |
commit | 4c17bdff1bb871fb31520b7b547f584c53ed854f (patch) | |
tree | edf1e3295d6ff7d67281efc585b2e913b4efda3d /app/plugin_api.go | |
parent | 7ed1177a2b676aa4c93515268642c855cfe57a37 (diff) | |
download | chat-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 'app/plugin_api.go')
-rw-r--r-- | app/plugin_api.go | 9 |
1 files changed, 9 insertions, 0 deletions
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) } |