From 7631d169c94163eebd044a902b40f7a887d030e6 Mon Sep 17 00:00:00 2001 From: Javier Aguirre Date: Mon, 30 Jan 2023 10:55:27 +0100 Subject: [PATCH] [MM-49006] Handle Plugin related events (#7011) * Handle Plugin related events * Remove old ws events * Adding the missing plugin events --- app/actions/websocket/index.ts | 7 +++++++ app/constants/websocket.ts | 2 ++ 2 files changed, 9 insertions(+) diff --git a/app/actions/websocket/index.ts b/app/actions/websocket/index.ts index 6fc0f370ec..7f06dfa866 100644 --- a/app/actions/websocket/index.ts +++ b/app/actions/websocket/index.ts @@ -409,6 +409,13 @@ export async function handleEvent(serverUrl: string, msg: WebSocketMessage) { break; case WebsocketEvents.GROUP_DISSOCIATED_TO_CHANNEL: break; + + // Plugins + case WebsocketEvents.PLUGIN_STATUSES_CHANGED: + case WebsocketEvents.PLUGIN_ENABLED: + case WebsocketEvents.PLUGIN_DISABLED: + // Do nothing, this event doesn't need logic in the mobile app + break; } } diff --git a/app/constants/websocket.ts b/app/constants/websocket.ts index d7a3e90dde..1de8846644 100644 --- a/app/constants/websocket.ts +++ b/app/constants/websocket.ts @@ -44,6 +44,8 @@ const WebsocketEvents = { EMOJI_ADDED: 'emoji_added', LICENSE_CHANGED: 'license_changed', CONFIG_CHANGED: 'config_changed', + PLUGIN_ENABLED: 'plugin_enabled', + PLUGIN_DISABLED: 'plugin_disabled', PLUGIN_STATUSES_CHANGED: 'plugin_statuses_changed', OPEN_DIALOG: 'open_dialog', INCREASE_POST_VISIBILITY_BY_ONE: 'increase_post_visibility_by_one',