mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:31:00 +00:00
fix(tlon): expose group invite allowlist
This commit is contained in:
@@ -29,6 +29,7 @@ const tlonCommonConfigFields = {
|
||||
network: TlonNetworkSchema,
|
||||
groupChannels: z.array(ChannelNestSchema).optional(),
|
||||
dmAllowlist: z.array(ShipSchema).optional(),
|
||||
groupInviteAllowlist: z.array(ShipSchema).optional(),
|
||||
autoDiscoverChannels: z.boolean().optional(),
|
||||
showModelSignature: z.boolean().optional(),
|
||||
responsePrefix: z.string().optional(),
|
||||
|
||||
@@ -101,6 +101,17 @@ describe("tlon core", () => {
|
||||
expect(parsed.accounts?.primary?.ship).toBe("~zod");
|
||||
});
|
||||
|
||||
it("exposes group invite allowlists in channel config schema", () => {
|
||||
expect(TlonConfigSchema.parse({ groupInviteAllowlist: ["~zod"] }).groupInviteAllowlist).toEqual(
|
||||
["~zod"],
|
||||
);
|
||||
expect(
|
||||
TlonConfigSchema.parse({
|
||||
accounts: { primary: { groupInviteAllowlist: ["~nec"] } },
|
||||
}).accounts?.primary?.groupInviteAllowlist,
|
||||
).toEqual(["~nec"]);
|
||||
});
|
||||
|
||||
it("configures ship, auth, and discovery settings", async () => {
|
||||
const prompter = createTestWizardPrompter({
|
||||
text: vi.fn(async ({ message }: { message: string }) => {
|
||||
|
||||
Reference in New Issue
Block a user