MM-11905: deactivate plugins before unregistering (#9666)

Plugins that listen for config changes might incorrectly re-register
their commands before being /actually/ deactivated, leaving the new
commands alive thereafter.
Этот коммит содержится в:
Jesse Hallam
2018-10-15 17:08:51 -04:00
коммит произвёл Christopher Speller
родитель 6aaa10bddb
Коммит b843774de8

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

@@ -120,9 +120,8 @@ func (a *App) removePlugin(id string) *model.AppError {
a.Publish(message)
}
a.UnregisterPluginCommands(id)
a.Plugins.Deactivate(id)
a.UnregisterPluginCommands(id)
err = os.RemoveAll(pluginPath)
if err != nil {