Skip to content

Commit 930e3e4

Browse files
committed
test: preserve Slack thread fallback in follow-up fixture
1 parent c23f68c commit 930e3e4

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

‎src/auto-reply/reply/followup-delivery.channel.test.ts‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,17 @@ describe("follow-up delivery channel boundary", () => {
168168
it("dedupes later Slack replies against their actual first-mode transport thread", () => {
169169
const slack = createChannelPlugin("slack");
170170
slack.threading = {
171-
resolveReplyTransport: ({ threadId, replyToId, replyToIsExplicit }) => ({
172-
threadId: null,
173-
replyToId: replyToIsExplicit ? replyToId : threadId == null ? undefined : String(threadId),
174-
}),
171+
resolveReplyTransport: ({ threadId, replyToId, replyToIsExplicit }) => {
172+
const inheritedThread = threadId == null ? undefined : String(threadId);
173+
// First-mode can clear replyToId; Slack still falls back to the inherited thread.
174+
return {
175+
threadId: null,
176+
replyToId:
177+
replyToIsExplicit === false
178+
? (inheritedThread ?? replyToId)
179+
: (replyToId ?? inheritedThread),
180+
};
181+
},
175182
};
176183
setActivePluginRegistry(
177184
createTestRegistry([{ pluginId: "slack", plugin: slack, source: "test" }]),

0 commit comments

Comments
 (0)