Skip to content

Mukul/mcp#4

Open
mukul7661 wants to merge 12 commits intomainfrom
mukul/mcp
Open

Mukul/mcp#4
mukul7661 wants to merge 12 commits intomainfrom
mukul/mcp

Conversation

@mukul7661
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread scripts/test-webhook.ts
id: 'forwardSlackMessageToSdkTest',
description: 'Forwards every Slack message to #sdk-test',
trigger: { plugin: 'slack', action: 'messages.message' },
handler: async (event: any) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any way to strongly type this event? seems unsafe to assert it to any

Comment thread server/sdk.ts
return [
`export async function ${id}() {`,
` // Handles both Slack's { event: {...} } wrapper and flat payloads`,
` const __payload = (__event as any)?.event ?? __event;`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also unsafe here to type a string to any. that means the code we insert it into could be incorrect as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants