(event: InboundTextEvent, explicitPluginTargets: ExplicitPluginTargetHint[])
| 16809 | } |
| 16810 | |
| 16811 | function withExplicitPluginTargetHints(event: InboundTextEvent, explicitPluginTargets: ExplicitPluginTargetHint[]) { |
| 16812 | const normalizedTargets = Array.isArray(explicitPluginTargets) |
| 16813 | ? explicitPluginTargets.filter((entry) => entry && typeof entry === 'object') |
| 16814 | : []; |
| 16815 | if (normalizedTargets.length === 0) { |
| 16816 | return event; |
| 16817 | } |
| 16818 | return withCodexbridgeMetadata(event, { |
| 16819 | explicitPluginTarget: normalizedTargets[0], |
| 16820 | explicitPluginTargets: normalizedTargets, |
| 16821 | }); |
| 16822 | } |
| 16823 | |
| 16824 | function resolveExplicitPluginTargetHint(event: InboundTextEvent | null | undefined): ExplicitPluginTargetHint | null { |
| 16825 | const hints = resolveExplicitPluginTargetHints(event); |
no test coverage detected