























@@ -18,6 +18,7 @@ describe("parseDiscordTarget", () => {
1818{ input: "<@123>", id: "123", normalized: "user:123" },
1919{ input: "<@!456>", id: "456", normalized: "user:456" },
2020{ input: "user:789", id: "789", normalized: "user:789" },
21+{ input: "discord:user:789", id: "789", normalized: "user:789" },
2122{ input: "discord:987", id: "987", normalized: "user:987" },
2223] as const;
2324for (const testCase of cases) {
@@ -32,6 +33,7 @@ describe("parseDiscordTarget", () => {
3233it("parses channel targets", () => {
3334const cases = [
3435{ input: "channel:555", id: "555", normalized: "channel:555" },
36+{ input: "discord:channel:555", id: "555", normalized: "channel:555" },
3537{ input: "general", id: "general", normalized: "channel:general" },
3638] as const;
3739for (const testCase of cases) {
@@ -225,6 +227,10 @@ describe("normalizeDiscordMessagingTarget", () => {
225227it("defaults raw numeric ids to channels", () => {
226228expect(normalizeDiscordMessagingTarget("123")).toBe("channel:123");
227229});
230+231+it("normalizes provider-prefixed channel targets as channels", () => {
232+expect(normalizeDiscordMessagingTarget("discord:channel:123")).toBe("channel:123");
233+});
228234});
229235230236describe("discord group policy", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。