fix: preserve discord announce account routing

This commit is contained in:
Peter Steinberger
2026-05-02 12:50:19 +01:00
parent 3ee41deba9
commit cd84e9bfb0
6 changed files with 78 additions and 4 deletions

View File

@@ -43,6 +43,7 @@
"blurb": "very well supported right now.",
"systemImage": "bubble.left.and.bubble.right",
"markdownCapable": true,
"preferSessionLookupForAnnounceTarget": true,
"commands": {
"nativeCommandsAutoEnabled": true,
"nativeSkillsAutoEnabled": true

View File

@@ -18,6 +18,7 @@ const DISCORD_CHANNEL_META = {
blurb: "very well supported right now.",
systemImage: "bubble.left.and.bubble.right",
markdownCapable: true,
preferSessionLookupForAnnounceTarget: true,
} as const;
export function getChatChannelMeta(id: string) {

View File

@@ -32,6 +32,12 @@ describe("createDiscordPluginBase", () => {
expect(plugin.security?.collectAuditFindings).toBeTypeOf("function");
});
it("hydrates announce delivery targets from stored session routing", () => {
const plugin = createDiscordPluginBase({ setup: {} as never });
expect(plugin.meta.preferSessionLookupForAnnounceTarget).toBe(true);
});
it("reports duplicate-token accounts as disabled to gateway startup", () => {
vi.stubEnv("DISCORD_BOT_TOKEN", "same-token");
const plugin = createDiscordPluginBase({ setup: {} as never });