Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Apr 26, 2024
1 parent 51655b4 commit 5ed3e5b
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions plugin-server/src/worker/plugins/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ed3e5b

Please sign in to comment.