From 5ed3e5b8aeeae7be015c59219a9423252de8a074 Mon Sep 17 00:00:00 2001 From: Ben White Date: Fri, 26 Apr 2024 13:57:41 +0200 Subject: [PATCH] comment --- plugin-server/src/worker/plugins/run.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/plugin-server/src/worker/plugins/run.ts b/plugin-server/src/worker/plugins/run.ts index bd434c0bd0fa6..f544a36659191 100644 --- a/plugin-server/src/worker/plugins/run.ts +++ b/plugin-server/src/worker/plugins/run.ts @@ -201,19 +201,17 @@ export async function runComposeWebhook(hub: Hub, event: PostHogEvent): Promise< // TODO: Filter shit out // // Filter based on actionmatching the event against the plugin's configured actions - // pluginConfigs = ( - // await Promise.all( - // pluginConfigs.map(async (pluginConfig) => { - // // TODO: Add matchActions option - // if (pluginConfig.matchActions.length === 0) { - // const matchedActions = await hub.actionMatcher.match(event) - // return pluginConfig.matchActions.some((actionId) => matchedActions.find((x) => x.id === actionId)) - // } - - // return pluginConfig - // }) - // ) - // ).filter(Boolean) as PluginConfig[] + // pluginMethodsToRun = await Promise.all( + // pluginMethodsToRun.map(async ([pluginConfig, composeWebhook]) => { + // // TODO: Filter to see if it matches the action in question + // if (pluginConfig.matchActions.length === 0) { + // const matchedActions = await hub.actionMatcher.match(event) + // return pluginConfig.matchActions.some((actionId) => matchedActions.find((x) => x.id === actionId)) + // } + + // return [pluginConfig, composeWebhook] + // }) + // ) await Promise.all( pluginMethodsToRun