@meetopenbot/slack 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -52,6 +52,10 @@ This applies only to **webhook ingress delegation**, not Slack MCP tools.
52
52
 
53
53
  ### Events (inbound mentions)
54
54
 
55
+ On **OpenBot Cloud**, mentions and DMs arrive on their own once the workspace connects Slack. OpenBot's Slack app sends every event to OpenBot Cloud. The cloud checks Slack's signature and forwards the event to the workspace that connected that Slack team, marked `verified`. Disconnecting stops the events. So does removing the app from Slack.
56
+
57
+ A **self-hosted** app sends its events straight to the runtime:
58
+
55
59
  1. Set `SLACK_SIGNING_SECRET` to the app's signing secret.
56
60
 
57
61
  2. Point Slack **Event Subscriptions** request URL to:
package/dist/webhook.js CHANGED
@@ -58,9 +58,12 @@ export async function* handleSlackWebhook(args) {
58
58
  yield webhookHttpResponse({ status: 200, body: { challenge: payload.challenge } });
59
59
  return;
60
60
  }
61
+ // On OpenBot Cloud the shared app's events arrive through the cloud, which checked the
62
+ // signature with the secret only it holds. A self-hosted app is checked here.
61
63
  const timestamp = getWebhookHeader(args.event, "x-slack-request-timestamp");
62
64
  const signature = getWebhookHeader(args.event, "x-slack-signature");
63
- if (!verifySlackSignature(signingSecret, rawBody, timestamp, signature)) {
65
+ if (!args.event.data.verified &&
66
+ !verifySlackSignature(signingSecret, rawBody, timestamp, signature)) {
64
67
  yield webhookHttpResponse({ status: 401, body: { error: "invalid signature" } });
65
68
  return;
66
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetopenbot/slack",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Slack Events API ingress, simple agent replies, and thread delivery for OpenBot",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@meetopenbot/plugin-sdk": "^2.8.0"
22
+ "@meetopenbot/plugin-sdk": "^2.9.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^20.10.1",