MCPcopy Index your code
hub / github.com/simstudioai/sim / matchEvent

Function matchEvent

apps/sim/lib/webhooks/providers/zoom.ts:132–158  ·  view source on GitHub ↗
({ webhook: wh, workflow, body, requestId, providerConfig }: EventMatchContext)

Source from the content-addressed store, hash-verified

130 },
131
132 async matchEvent({ webhook: wh, workflow, body, requestId, providerConfig }: EventMatchContext) {
133 const triggerId = providerConfig.triggerId as string | undefined
134 const obj = body as Record<string, unknown>
135 const event = typeof obj.event === 'string' ? obj.event : ''
136
137 if (event === 'endpoint.url_validation') {
138 return false
139 }
140
141 if (triggerId) {
142 const { isZoomEventMatch } = await import('@/triggers/zoom/utils')
143 if (!isZoomEventMatch(triggerId, event)) {
144 logger.debug(
145 `[${requestId}] Zoom event mismatch for trigger ${triggerId}. Event: ${event}. Skipping execution.`,
146 {
147 webhookId: wh.id,
148 workflowId: workflow.id,
149 triggerId,
150 receivedEvent: event,
151 }
152 )
153 return false
154 }
155 }
156
157 return true
158 },
159
160 /**
161 * Handle Zoom endpoint URL validation challenges.

Callers

nothing calls this directly

Calls 2

isZoomEventMatchFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected