mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-14 19:40:40 +00:00
Adds IRC as a first-class channel with core config surfaces (schema/hints/dock), plugin auto-enable detection, routing/policy alignment, and docs/tests. Co-authored-by: Vignesh <vigneshnatarajan92@gmail.com>
28 lines
810 B
TypeScript
28 lines
810 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { IrcConfigSchema } from "./config-schema.js";
|
|
|
|
describe("irc config schema", () => {
|
|
it("accepts numeric allowFrom and groupAllowFrom entries", () => {
|
|
const parsed = IrcConfigSchema.parse({
|
|
dmPolicy: "allowlist",
|
|
allowFrom: [12345, "alice"],
|
|
groupAllowFrom: [67890, "alice!ident@example.org"],
|
|
});
|
|
|
|
expect(parsed.allowFrom).toEqual([12345, "alice"]);
|
|
expect(parsed.groupAllowFrom).toEqual([67890, "alice!ident@example.org"]);
|
|
});
|
|
|
|
it("accepts numeric per-channel allowFrom entries", () => {
|
|
const parsed = IrcConfigSchema.parse({
|
|
groups: {
|
|
"#ops": {
|
|
allowFrom: [42, "alice"],
|
|
},
|
|
},
|
|
});
|
|
|
|
expect(parsed.groups?.["#ops"]?.allowFrom).toEqual([42, "alice"]);
|
|
});
|
|
});
|