mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:21:23 +00:00
fix(discord): replyToMode first behaviour
This commit is contained in:
@@ -93,7 +93,22 @@ describe("resolveDiscordReplyDeliveryPlan", () => {
|
||||
threadChannel: { id: "thread" },
|
||||
createdThreadId: null,
|
||||
});
|
||||
// "all" returns the reference on every call.
|
||||
expect(plan.replyReference.use()).toBe("m1");
|
||||
expect(plan.replyReference.use()).toBe("m1");
|
||||
});
|
||||
|
||||
it("uses existingId only on first call with replyToMode first inside a thread", () => {
|
||||
const plan = resolveDiscordReplyDeliveryPlan({
|
||||
replyTarget: "channel:thread",
|
||||
replyToMode: "first",
|
||||
messageId: "m1",
|
||||
threadChannel: { id: "thread" },
|
||||
createdThreadId: null,
|
||||
});
|
||||
// "first" returns the reference only once.
|
||||
expect(plan.replyReference.use()).toBe("m1");
|
||||
expect(plan.replyReference.use()).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user