From 6b1c82c4f14f1e24d9aa863504db96ae87ca19eb Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 7 Mar 2026 21:38:27 +0000 Subject: [PATCH] refactor: unify onboarding dm/group policy scaffolding --- extensions/bluebubbles/src/onboarding.ts | 20 ++---- extensions/feishu/src/onboarding.ts | 56 +++++---------- extensions/irc/src/onboarding.ts | 36 ++++------ extensions/matrix/src/onboarding.ts | 18 ++--- extensions/msteams/src/onboarding.ts | 56 +++++---------- extensions/nextcloud-talk/src/onboarding.ts | 25 ++----- extensions/zalo/src/onboarding.ts | 20 ++---- extensions/zalouser/src/onboarding.ts | 20 ++---- .../plugins/onboarding/helpers.test.ts | 70 +++++++++++++++++++ src/channels/plugins/onboarding/helpers.ts | 69 ++++++++++++++++++ src/plugin-sdk/bluebubbles.ts | 1 + src/plugin-sdk/feishu.ts | 3 + src/plugin-sdk/googlechat.ts | 1 + src/plugin-sdk/index.ts | 4 ++ src/plugin-sdk/irc.ts | 2 + src/plugin-sdk/matrix.ts | 1 + src/plugin-sdk/msteams.ts | 3 + src/plugin-sdk/nextcloud-talk.ts | 1 + src/plugin-sdk/zalo.ts | 1 + src/plugin-sdk/zalouser.ts | 1 + 20 files changed, 239 insertions(+), 169 deletions(-) diff --git a/extensions/bluebubbles/src/onboarding.ts b/extensions/bluebubbles/src/onboarding.ts index aa011607e0a..86b9719ae24 100644 --- a/extensions/bluebubbles/src/onboarding.ts +++ b/extensions/bluebubbles/src/onboarding.ts @@ -7,11 +7,11 @@ import type { } from "openclaw/plugin-sdk/bluebubbles"; import { DEFAULT_ACCOUNT_ID, - addWildcardAllowFrom, formatDocsLink, mergeAllowFromEntries, normalizeAccountId, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "openclaw/plugin-sdk/bluebubbles"; import { listBlueBubblesAccountIds, @@ -26,19 +26,11 @@ import { normalizeBlueBubblesServerUrl } from "./types.js"; const channel = "bluebubbles" as const; function setBlueBubblesDmPolicy(cfg: OpenClawConfig, dmPolicy: DmPolicy): OpenClawConfig { - const allowFrom = - dmPolicy === "open" ? addWildcardAllowFrom(cfg.channels?.bluebubbles?.allowFrom) : undefined; - return { - ...cfg, - channels: { - ...cfg.channels, - bluebubbles: { - ...cfg.channels?.bluebubbles, - dmPolicy, - ...(allowFrom ? { allowFrom } : {}), - }, - }, - }; + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "bluebubbles", + dmPolicy, + }); } function setBlueBubblesAllowFrom( diff --git a/extensions/feishu/src/onboarding.ts b/extensions/feishu/src/onboarding.ts index b29b544dd08..cf179057441 100644 --- a/extensions/feishu/src/onboarding.ts +++ b/extensions/feishu/src/onboarding.ts @@ -7,11 +7,13 @@ import type { WizardPrompter, } from "openclaw/plugin-sdk/feishu"; import { - addWildcardAllowFrom, DEFAULT_ACCOUNT_ID, formatDocsLink, hasConfiguredSecretInput, promptSingleChannelSecretInput, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, } from "openclaw/plugin-sdk/feishu"; import { resolveFeishuCredentials } from "./accounts.js"; import { probeFeishu } from "./probe.js"; @@ -28,34 +30,19 @@ function normalizeString(value: unknown): string | undefined { } function setFeishuDmPolicy(cfg: ClawdbotConfig, dmPolicy: DmPolicy): ClawdbotConfig { - const allowFrom = - dmPolicy === "open" - ? addWildcardAllowFrom(cfg.channels?.feishu?.allowFrom)?.map((entry) => String(entry)) - : undefined; - return { - ...cfg, - channels: { - ...cfg.channels, - feishu: { - ...cfg.channels?.feishu, - dmPolicy, - ...(allowFrom ? { allowFrom } : {}), - }, - }, - }; + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "feishu", + dmPolicy, + }) as ClawdbotConfig; } function setFeishuAllowFrom(cfg: ClawdbotConfig, allowFrom: string[]): ClawdbotConfig { - return { - ...cfg, - channels: { - ...cfg.channels, - feishu: { - ...cfg.channels?.feishu, - allowFrom, - }, - }, - }; + return setTopLevelChannelAllowFrom({ + cfg, + channel: "feishu", + allowFrom, + }) as ClawdbotConfig; } function parseAllowFromInput(raw: string): string[] { @@ -137,17 +124,12 @@ function setFeishuGroupPolicy( cfg: ClawdbotConfig, groupPolicy: "open" | "allowlist" | "disabled", ): ClawdbotConfig { - return { - ...cfg, - channels: { - ...cfg.channels, - feishu: { - ...cfg.channels?.feishu, - enabled: true, - groupPolicy, - }, - }, - }; + return setTopLevelChannelGroupPolicy({ + cfg, + channel: "feishu", + groupPolicy, + enabled: true, + }) as ClawdbotConfig; } function setFeishuGroupAllowFrom(cfg: ClawdbotConfig, groupAllowFrom: string[]): ClawdbotConfig { diff --git a/extensions/irc/src/onboarding.ts b/extensions/irc/src/onboarding.ts index 99e8561175f..d7d7b7f79a9 100644 --- a/extensions/irc/src/onboarding.ts +++ b/extensions/irc/src/onboarding.ts @@ -1,9 +1,10 @@ import { - addWildcardAllowFrom, DEFAULT_ACCOUNT_ID, formatDocsLink, promptChannelAccessConfig, resolveAccountIdForConfigure, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, type ChannelOnboardingAdapter, type ChannelOnboardingDmPolicy, type DmPolicy, @@ -90,32 +91,19 @@ function updateIrcAccountConfig( } function setIrcDmPolicy(cfg: CoreConfig, dmPolicy: DmPolicy): CoreConfig { - const allowFrom = - dmPolicy === "open" ? addWildcardAllowFrom(cfg.channels?.irc?.allowFrom) : undefined; - return { - ...cfg, - channels: { - ...cfg.channels, - irc: { - ...cfg.channels?.irc, - dmPolicy, - ...(allowFrom ? { allowFrom } : {}), - }, - }, - }; + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "irc", + dmPolicy, + }) as CoreConfig; } function setIrcAllowFrom(cfg: CoreConfig, allowFrom: string[]): CoreConfig { - return { - ...cfg, - channels: { - ...cfg.channels, - irc: { - ...cfg.channels?.irc, - allowFrom, - }, - }, - }; + return setTopLevelChannelAllowFrom({ + cfg, + channel: "irc", + allowFrom, + }) as CoreConfig; } function setIrcNickServ( diff --git a/extensions/matrix/src/onboarding.ts b/extensions/matrix/src/onboarding.ts index 44d2ca00604..7b5b7aa5346 100644 --- a/extensions/matrix/src/onboarding.ts +++ b/extensions/matrix/src/onboarding.ts @@ -7,6 +7,7 @@ import { mergeAllowFromEntries, promptSingleChannelSecretInput, promptChannelAccessConfig, + setTopLevelChannelGroupPolicy, type SecretInput, type ChannelOnboardingAdapter, type ChannelOnboardingDmPolicy, @@ -143,17 +144,12 @@ async function promptMatrixAllowFrom(params: { } function setMatrixGroupPolicy(cfg: CoreConfig, groupPolicy: "open" | "allowlist" | "disabled") { - return { - ...cfg, - channels: { - ...cfg.channels, - matrix: { - ...cfg.channels?.matrix, - enabled: true, - groupPolicy, - }, - }, - }; + return setTopLevelChannelGroupPolicy({ + cfg, + channel: "matrix", + groupPolicy, + enabled: true, + }) as CoreConfig; } function setMatrixGroupRooms(cfg: CoreConfig, roomKeys: string[]) { diff --git a/extensions/msteams/src/onboarding.ts b/extensions/msteams/src/onboarding.ts index 9c95cc2b3cd..f1199d9e0e3 100644 --- a/extensions/msteams/src/onboarding.ts +++ b/extensions/msteams/src/onboarding.ts @@ -7,11 +7,13 @@ import type { MSTeamsTeamConfig, } from "openclaw/plugin-sdk/msteams"; import { - addWildcardAllowFrom, DEFAULT_ACCOUNT_ID, formatDocsLink, mergeAllowFromEntries, promptChannelAccessConfig, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, } from "openclaw/plugin-sdk/msteams"; import { parseMSTeamsTeamEntry, @@ -24,34 +26,19 @@ import { hasConfiguredMSTeamsCredentials, resolveMSTeamsCredentials } from "./to const channel = "msteams" as const; function setMSTeamsDmPolicy(cfg: OpenClawConfig, dmPolicy: DmPolicy) { - const allowFrom = - dmPolicy === "open" - ? addWildcardAllowFrom(cfg.channels?.msteams?.allowFrom)?.map((entry) => String(entry)) - : undefined; - return { - ...cfg, - channels: { - ...cfg.channels, - msteams: { - ...cfg.channels?.msteams, - dmPolicy, - ...(allowFrom ? { allowFrom } : {}), - }, - }, - }; + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "msteams", + dmPolicy, + }); } function setMSTeamsAllowFrom(cfg: OpenClawConfig, allowFrom: string[]): OpenClawConfig { - return { - ...cfg, - channels: { - ...cfg.channels, - msteams: { - ...cfg.channels?.msteams, - allowFrom, - }, - }, - }; + return setTopLevelChannelAllowFrom({ + cfg, + channel: "msteams", + allowFrom, + }); } function parseAllowFromInput(raw: string): string[] { @@ -171,17 +158,12 @@ function setMSTeamsGroupPolicy( cfg: OpenClawConfig, groupPolicy: "open" | "allowlist" | "disabled", ): OpenClawConfig { - return { - ...cfg, - channels: { - ...cfg.channels, - msteams: { - ...cfg.channels?.msteams, - enabled: true, - groupPolicy, - }, - }, - }; + return setTopLevelChannelGroupPolicy({ + cfg, + channel: "msteams", + groupPolicy, + enabled: true, + }); } function setMSTeamsTeamsAllowlist( diff --git a/extensions/nextcloud-talk/src/onboarding.ts b/extensions/nextcloud-talk/src/onboarding.ts index 13ae49a41a7..1d897cbd6eb 100644 --- a/extensions/nextcloud-talk/src/onboarding.ts +++ b/extensions/nextcloud-talk/src/onboarding.ts @@ -1,5 +1,4 @@ import { - addWildcardAllowFrom, formatDocsLink, hasConfiguredSecretInput, mergeAllowFromEntries, @@ -7,6 +6,7 @@ import { resolveAccountIdForConfigure, DEFAULT_ACCOUNT_ID, normalizeAccountId, + setTopLevelChannelDmPolicyWithAllowFrom, type SecretInput, type ChannelOnboardingAdapter, type ChannelOnboardingDmPolicy, @@ -23,24 +23,13 @@ import type { CoreConfig, DmPolicy } from "./types.js"; const channel = "nextcloud-talk" as const; function setNextcloudTalkDmPolicy(cfg: CoreConfig, dmPolicy: DmPolicy): CoreConfig { - const existingConfig = cfg.channels?.["nextcloud-talk"]; - const existingAllowFrom: string[] = (existingConfig?.allowFrom ?? []).map((x) => String(x)); - const allowFrom: string[] = - dmPolicy === "open" ? (addWildcardAllowFrom(existingAllowFrom) as string[]) : existingAllowFrom; - - const newNextcloudTalkConfig = { - ...existingConfig, + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "nextcloud-talk", dmPolicy, - allowFrom, - }; - - return { - ...cfg, - channels: { - ...cfg.channels, - "nextcloud-talk": newNextcloudTalkConfig, - }, - } as CoreConfig; + getAllowFrom: (inputCfg) => + (inputCfg.channels?.["nextcloud-talk"]?.allowFrom ?? []).map((entry) => String(entry)), + }) as CoreConfig; } function setNextcloudTalkAccountConfig( diff --git a/extensions/zalo/src/onboarding.ts b/extensions/zalo/src/onboarding.ts index 17388982a9f..35f7759649b 100644 --- a/extensions/zalo/src/onboarding.ts +++ b/extensions/zalo/src/onboarding.ts @@ -6,13 +6,13 @@ import type { WizardPrompter, } from "openclaw/plugin-sdk/zalo"; import { - addWildcardAllowFrom, DEFAULT_ACCOUNT_ID, hasConfiguredSecretInput, mergeAllowFromEntries, normalizeAccountId, promptSingleChannelSecretInput, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "openclaw/plugin-sdk/zalo"; import { listZaloAccountIds, resolveDefaultZaloAccountId, resolveZaloAccount } from "./accounts.js"; @@ -24,19 +24,11 @@ function setZaloDmPolicy( cfg: OpenClawConfig, dmPolicy: "pairing" | "allowlist" | "open" | "disabled", ) { - const allowFrom = - dmPolicy === "open" ? addWildcardAllowFrom(cfg.channels?.zalo?.allowFrom) : undefined; - return { - ...cfg, - channels: { - ...cfg.channels, - zalo: { - ...cfg.channels?.zalo, - dmPolicy, - ...(allowFrom ? { allowFrom } : {}), - }, - }, - } as OpenClawConfig; + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "zalo", + dmPolicy, + }) as OpenClawConfig; } function setZaloUpdateMode( diff --git a/extensions/zalouser/src/onboarding.ts b/extensions/zalouser/src/onboarding.ts index 21ec359e5ad..ae8f53bf0d5 100644 --- a/extensions/zalouser/src/onboarding.ts +++ b/extensions/zalouser/src/onboarding.ts @@ -5,13 +5,13 @@ import type { WizardPrompter, } from "openclaw/plugin-sdk/zalouser"; import { - addWildcardAllowFrom, DEFAULT_ACCOUNT_ID, formatResolvedUnresolvedNote, mergeAllowFromEntries, normalizeAccountId, promptChannelAccessConfig, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "openclaw/plugin-sdk/zalouser"; import { listZalouserAccountIds, @@ -73,19 +73,11 @@ function setZalouserDmPolicy( cfg: OpenClawConfig, dmPolicy: "pairing" | "allowlist" | "open" | "disabled", ): OpenClawConfig { - const allowFrom = - dmPolicy === "open" ? addWildcardAllowFrom(cfg.channels?.zalouser?.allowFrom) : undefined; - return { - ...cfg, - channels: { - ...cfg.channels, - zalouser: { - ...cfg.channels?.zalouser, - dmPolicy, - ...(allowFrom ? { allowFrom } : {}), - }, - }, - } as OpenClawConfig; + return setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "zalouser", + dmPolicy, + }) as OpenClawConfig; } async function noteZalouserHelp(prompter: WizardPrompter): Promise { diff --git a/src/channels/plugins/onboarding/helpers.test.ts b/src/channels/plugins/onboarding/helpers.test.ts index 7df3683a9e2..95f577dc82a 100644 --- a/src/channels/plugins/onboarding/helpers.test.ts +++ b/src/channels/plugins/onboarding/helpers.test.ts @@ -27,6 +27,9 @@ import { setAccountAllowFromForChannel, setAccountGroupPolicyForChannel, setChannelDmPolicyWithAllowFrom, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, setLegacyChannelAllowFrom, setLegacyChannelDmPolicyWithAllowFrom, setOnboardingChannelEnabled, @@ -913,6 +916,73 @@ describe("setChannelDmPolicyWithAllowFrom", () => { }); }); +describe("setTopLevelChannelDmPolicyWithAllowFrom", () => { + it("adds wildcard allowFrom for open policy", () => { + const cfg: OpenClawConfig = { + channels: { + zalo: { + dmPolicy: "pairing", + allowFrom: ["12345"], + }, + }, + }; + + const next = setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "zalo", + dmPolicy: "open", + }); + expect(next.channels?.zalo?.dmPolicy).toBe("open"); + expect(next.channels?.zalo?.allowFrom).toEqual(["12345", "*"]); + }); + + it("supports custom allowFrom lookup callback", () => { + const cfg: OpenClawConfig = { + channels: { + "nextcloud-talk": { + dmPolicy: "pairing", + allowFrom: ["alice"], + }, + }, + }; + + const next = setTopLevelChannelDmPolicyWithAllowFrom({ + cfg, + channel: "nextcloud-talk", + dmPolicy: "open", + getAllowFrom: (inputCfg) => + (inputCfg.channels?.["nextcloud-talk"]?.allowFrom ?? []).map((entry) => String(entry)), + }); + expect(next.channels?.["nextcloud-talk"]?.allowFrom).toEqual(["alice", "*"]); + }); +}); + +describe("setTopLevelChannelAllowFrom", () => { + it("writes allowFrom and can force enabled state", () => { + const next = setTopLevelChannelAllowFrom({ + cfg: {}, + channel: "msteams", + allowFrom: ["user-1"], + enabled: true, + }); + expect(next.channels?.msteams?.allowFrom).toEqual(["user-1"]); + expect(next.channels?.msteams?.enabled).toBe(true); + }); +}); + +describe("setTopLevelChannelGroupPolicy", () => { + it("writes groupPolicy and can force enabled state", () => { + const next = setTopLevelChannelGroupPolicy({ + cfg: {}, + channel: "feishu", + groupPolicy: "allowlist", + enabled: true, + }); + expect(next.channels?.feishu?.groupPolicy).toBe("allowlist"); + expect(next.channels?.feishu?.enabled).toBe(true); + }); +}); + describe("splitOnboardingEntries", () => { it("splits comma/newline/semicolon input and trims blanks", () => { expect(splitOnboardingEntries(" alice, bob \ncarol; ;\n")).toEqual(["alice", "bob", "carol"]); diff --git a/src/channels/plugins/onboarding/helpers.ts b/src/channels/plugins/onboarding/helpers.ts index 9dc7e1e17ef..e82ad012a17 100644 --- a/src/channels/plugins/onboarding/helpers.ts +++ b/src/channels/plugins/onboarding/helpers.ts @@ -161,6 +161,75 @@ export function setAccountAllowFromForChannel(params: { }); } +export function setTopLevelChannelAllowFrom(params: { + cfg: OpenClawConfig; + channel: string; + allowFrom: string[]; + enabled?: boolean; +}): OpenClawConfig { + const channelConfig = + (params.cfg.channels?.[params.channel] as Record | undefined) ?? {}; + return { + ...params.cfg, + channels: { + ...params.cfg.channels, + [params.channel]: { + ...channelConfig, + ...(params.enabled ? { enabled: true } : {}), + allowFrom: params.allowFrom, + }, + }, + }; +} + +export function setTopLevelChannelDmPolicyWithAllowFrom(params: { + cfg: OpenClawConfig; + channel: string; + dmPolicy: DmPolicy; + getAllowFrom?: (cfg: OpenClawConfig) => Array | undefined; +}): OpenClawConfig { + const channelConfig = + (params.cfg.channels?.[params.channel] as Record | undefined) ?? {}; + const existingAllowFrom = + params.getAllowFrom?.(params.cfg) ?? + (channelConfig.allowFrom as Array | undefined) ?? + undefined; + const allowFrom = + params.dmPolicy === "open" ? addWildcardAllowFrom(existingAllowFrom) : undefined; + return { + ...params.cfg, + channels: { + ...params.cfg.channels, + [params.channel]: { + ...channelConfig, + dmPolicy: params.dmPolicy, + ...(allowFrom ? { allowFrom } : {}), + }, + }, + }; +} + +export function setTopLevelChannelGroupPolicy(params: { + cfg: OpenClawConfig; + channel: string; + groupPolicy: GroupPolicy; + enabled?: boolean; +}): OpenClawConfig { + const channelConfig = + (params.cfg.channels?.[params.channel] as Record | undefined) ?? {}; + return { + ...params.cfg, + channels: { + ...params.cfg.channels, + [params.channel]: { + ...channelConfig, + ...(params.enabled ? { enabled: true } : {}), + groupPolicy: params.groupPolicy, + }, + }, + }; +} + export function setChannelDmPolicyWithAllowFrom(params: { cfg: OpenClawConfig; channel: "imessage" | "signal" | "telegram"; diff --git a/src/plugin-sdk/bluebubbles.ts b/src/plugin-sdk/bluebubbles.ts index 22d7441051a..9af0103b59c 100644 --- a/src/plugin-sdk/bluebubbles.ts +++ b/src/plugin-sdk/bluebubbles.ts @@ -40,6 +40,7 @@ export { mergeAllowFromEntries, promptAccountId, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export { diff --git a/src/plugin-sdk/feishu.ts b/src/plugin-sdk/feishu.ts index 4a21071e4c6..5bd47f942f0 100644 --- a/src/plugin-sdk/feishu.ts +++ b/src/plugin-sdk/feishu.ts @@ -18,6 +18,9 @@ export type { export { addWildcardAllowFrom, promptSingleChannelSecretInput, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export type { diff --git a/src/plugin-sdk/googlechat.ts b/src/plugin-sdk/googlechat.ts index 65a6d0456c0..ff0fe9281bf 100644 --- a/src/plugin-sdk/googlechat.ts +++ b/src/plugin-sdk/googlechat.ts @@ -32,6 +32,7 @@ export { mergeAllowFromEntries, promptAccountId, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export { diff --git a/src/plugin-sdk/index.ts b/src/plugin-sdk/index.ts index 06f95c58d6b..0a8b55bf23f 100644 --- a/src/plugin-sdk/index.ts +++ b/src/plugin-sdk/index.ts @@ -533,6 +533,10 @@ export { addWildcardAllowFrom, mergeAllowFromEntries, promptAccountId, + resolveAccountIdForConfigure, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, } from "../channels/plugins/onboarding/helpers.js"; export { promptChannelAccessConfig } from "../channels/plugins/onboarding/channel-access.js"; diff --git a/src/plugin-sdk/irc.ts b/src/plugin-sdk/irc.ts index 128a11fc38e..969099ec3c1 100644 --- a/src/plugin-sdk/irc.ts +++ b/src/plugin-sdk/irc.ts @@ -19,6 +19,8 @@ export { addWildcardAllowFrom, promptAccountId, resolveAccountIdForConfigure, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export type { BaseProbeResult } from "../channels/plugins/types.js"; diff --git a/src/plugin-sdk/matrix.ts b/src/plugin-sdk/matrix.ts index 5cb039af0c2..89feb7079e3 100644 --- a/src/plugin-sdk/matrix.ts +++ b/src/plugin-sdk/matrix.ts @@ -36,6 +36,7 @@ export { addWildcardAllowFrom, mergeAllowFromEntries, promptSingleChannelSecretInput, + setTopLevelChannelGroupPolicy, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export { applyAccountNameToChannelSection } from "../channels/plugins/setup-helpers.js"; diff --git a/src/plugin-sdk/msteams.ts b/src/plugin-sdk/msteams.ts index ae3e7d3564e..8b68b52b105 100644 --- a/src/plugin-sdk/msteams.ts +++ b/src/plugin-sdk/msteams.ts @@ -37,6 +37,9 @@ export { promptChannelAccessConfig } from "../channels/plugins/onboarding/channe export { addWildcardAllowFrom, mergeAllowFromEntries, + setTopLevelChannelAllowFrom, + setTopLevelChannelDmPolicyWithAllowFrom, + setTopLevelChannelGroupPolicy, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export type { diff --git a/src/plugin-sdk/nextcloud-talk.ts b/src/plugin-sdk/nextcloud-talk.ts index d224ca38da7..30a01ca79dc 100644 --- a/src/plugin-sdk/nextcloud-talk.ts +++ b/src/plugin-sdk/nextcloud-talk.ts @@ -27,6 +27,7 @@ export { promptAccountId, promptSingleChannelSecretInput, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "../channels/plugins/onboarding/helpers.js"; export { applyAccountNameToChannelSection } from "../channels/plugins/setup-helpers.js"; export { createAccountListHelpers } from "../channels/plugins/account-helpers.js"; diff --git a/src/plugin-sdk/zalo.ts b/src/plugin-sdk/zalo.ts index 3036c216390..d259a3659ae 100644 --- a/src/plugin-sdk/zalo.ts +++ b/src/plugin-sdk/zalo.ts @@ -21,6 +21,7 @@ export { promptAccountId, promptSingleChannelSecretInput, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "../channels/plugins/onboarding/helpers.js"; export { PAIRING_APPROVED_MESSAGE } from "../channels/plugins/pairing-message.js"; export { diff --git a/src/plugin-sdk/zalouser.ts b/src/plugin-sdk/zalouser.ts index 31a580460d6..48b4f941e15 100644 --- a/src/plugin-sdk/zalouser.ts +++ b/src/plugin-sdk/zalouser.ts @@ -21,6 +21,7 @@ export { mergeAllowFromEntries, promptAccountId, resolveAccountIdForConfigure, + setTopLevelChannelDmPolicyWithAllowFrom, } from "../channels/plugins/onboarding/helpers.js"; export { applyAccountNameToChannelSection,