Remove support for unused product interfaces (#24965)

We no longer rely on commands and hooks for products, so simplify this code.
Этот коммит содержится в:
Jesse Hallam
2023-10-17 11:55:41 -03:00
коммит произвёл GitHub
родитель 1de790a4fe
Коммит 2ba91e43b6
13 изменённых файлов: 3 добавлений и 515 удалений

Просмотреть файл

@@ -202,7 +202,7 @@ func (a *App) ExecuteCommand(c *request.Context, args *model.CommandArgs) (*mode
args.TriggerId = triggerId
// Plugins can override built in, custom, and product commands
// Plugins can override built in and custom commands
cmd, response, appErr := a.tryExecutePluginCommand(c, args)
if appErr != nil {
return nil, appErr
@@ -211,15 +211,6 @@ func (a *App) ExecuteCommand(c *request.Context, args *model.CommandArgs) (*mode
return a.HandleCommandResponse(c, cmd, args, response, true)
}
// Products can override built in and custom commands
cmd, response, appErr = a.tryExecuteProductCommand(c, args)
if appErr != nil {
return nil, appErr
} else if cmd != nil && response != nil {
response.TriggerId = clientTriggerId
return a.HandleCommandResponse(c, cmd, args, response, true)
}
// Custom commands can override built ins
cmd, response, appErr = a.tryExecuteCustomCommand(c, args, trigger, message)
if appErr != nil {