experimental-ash 0.11.0 → 0.11.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# experimental-ash
|
|
2
2
|
|
|
3
|
+
## 0.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6bc3fe0: fix(slack): allow `slackChannel` to handle whichever twin event arrives first
|
|
8
|
+
|
|
9
|
+
Slack delivers two webhook events for every `@bot` channel mention — one
|
|
10
|
+
`event.type: "message"` and one `event.type: "app_mention"`, both carrying
|
|
11
|
+
the same `event.ts`. The chat SDK dedupes incoming events on `message.id`
|
|
12
|
+
(= Slack `event.ts`), so only the first of the twin events reaches the
|
|
13
|
+
mention listener. The userland filter `if (raw?.type !== "app_mention")
|
|
14
|
+
return;` would then drop that surviving event whenever the `message`
|
|
15
|
+
twin arrived first, silently swallowing the mention. Removing the filter
|
|
16
|
+
lets the listener handle whichever twin arrives; both carry identical
|
|
17
|
+
text/channel/team. This also unblocks DMs, which only deliver `message`
|
|
18
|
+
events (no `app_mention` twin).
|
|
19
|
+
|
|
3
20
|
## 0.11.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -6,7 +6,7 @@ import { ASH_PACKAGE_NAME } from "#package-name.js";
|
|
|
6
6
|
let cachedPackageInfo;
|
|
7
7
|
// The package build stamps the published version into `dist` so bundled
|
|
8
8
|
// deployments can still report package metadata without resolving package.json.
|
|
9
|
-
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.11.
|
|
9
|
+
const BUNDLED_FALLBACK_PACKAGE_VERSION = "0.11.1";
|
|
10
10
|
const BUNDLED_FALLBACK_PACKAGE_VERSION_PLACEHOLDER = "__ASH_PACKAGE_VERSION_PLACEHOLDER__";
|
|
11
11
|
const WORKFLOW_MODULE_ALIASES = {
|
|
12
12
|
"workflow/api": "src/compiled/@workflow/core/runtime.js",
|
|
@@ -68,16 +68,12 @@ function buildMentionListener(config, uploadPolicy, getSend) {
|
|
|
68
68
|
const onMention = config.onMention ?? defaultOnMention;
|
|
69
69
|
return async (thread, message) => {
|
|
70
70
|
const raw = message.raw;
|
|
71
|
-
// Slack delivers `app_mention` and `message.channels` for the same
|
|
72
|
-
// utterance; only the former is the listener's job.
|
|
73
|
-
if (raw?.type !== "app_mention")
|
|
74
|
-
return;
|
|
75
71
|
const send = getSend();
|
|
76
72
|
if (!send) {
|
|
77
73
|
log.warn("slack mention received before any request captured send");
|
|
78
74
|
return;
|
|
79
75
|
}
|
|
80
|
-
const teamId = raw
|
|
76
|
+
const teamId = raw?.team_id ?? raw?.team;
|
|
81
77
|
const slackCtx = {
|
|
82
78
|
thread,
|
|
83
79
|
slack: buildSlackApiHandle(thread, config.credentials?.botToken, teamId),
|