From 7bfb5aec26c6bb8c49fa19e8347bc91acc86fe92 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 5 Jul 2018 10:23:55 -0400 Subject: Add back enable/disable WS events (#9052) --- app/plugin_install.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/plugin_install.go') diff --git a/app/plugin_install.go b/app/plugin_install.go index c03ad2108..e49f6f83e 100644 --- a/app/plugin_install.go +++ b/app/plugin_install.go @@ -108,6 +108,12 @@ func (a *App) removePlugin(id string) *model.AppError { return model.NewAppError("removePlugin", "app.plugin.not_installed.app_error", nil, "", http.StatusBadRequest) } + if a.Plugins.IsActive(id) && manifest.HasClient() { + message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_PLUGIN_DISABLED, "", "", "", nil) + message.Add("manifest", manifest.ClientManifest()) + a.Publish(message) + } + a.Plugins.Deactivate(id) err = os.RemoveAll(pluginPath) -- cgit v1.2.3-1-g7c22