fix(tlon): expose group invite allowlist

This commit is contained in:
Vincent Koc
2026-05-03 15:08:09 -07:00
parent 41df8191c5
commit d57b16ff81
6 changed files with 36 additions and 4 deletions

View File

@@ -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(),

View File

@@ -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 }) => {