diff --git a/extensions/matrix/src/matrix/monitor/handler.ts b/extensions/matrix/src/matrix/monitor/handler.ts index 8bcc0e016..8c93476e5 100644 --- a/extensions/matrix/src/matrix/monitor/handler.ts +++ b/extensions/matrix/src/matrix/monitor/handler.ts @@ -215,14 +215,13 @@ export function createMatrixRoomMessageHandler(params: MatrixMonitorHandlerParam } const senderName = await getMemberDisplayName(roomId, senderId); - const storeAllowFrom = - isDirectMessage - ? await readStoreAllowFromForDmPolicy({ - provider: "matrix", - dmPolicy, - readStore: (provider) => core.channel.pairing.readAllowFromStore(provider), - }) - : []; + const storeAllowFrom = isDirectMessage + ? await readStoreAllowFromForDmPolicy({ + provider: "matrix", + dmPolicy, + readStore: (provider) => core.channel.pairing.readAllowFromStore(provider), + }) + : []; const groupAllowFrom = cfg.channels?.matrix?.groupAllowFrom ?? []; const normalizedGroupAllowFrom = normalizeMatrixAllowList(groupAllowFrom); const senderGroupPolicy = diff --git a/src/slack/monitor/auth.ts b/src/slack/monitor/auth.ts index 9cd150e12..238a32d7e 100644 --- a/src/slack/monitor/auth.ts +++ b/src/slack/monitor/auth.ts @@ -14,14 +14,13 @@ export async function resolveSlackEffectiveAllowFrom( options?: { includePairingStore?: boolean }, ) { const includePairingStore = options?.includePairingStore === true; - const storeAllowFrom = - includePairingStore - ? await readStoreAllowFromForDmPolicy({ - provider: "slack", - dmPolicy: ctx.dmPolicy, - readStore: (provider) => readChannelAllowFromStore(provider), - }) - : []; + const storeAllowFrom = includePairingStore + ? await readStoreAllowFromForDmPolicy({ + provider: "slack", + dmPolicy: ctx.dmPolicy, + readStore: (provider) => readChannelAllowFromStore(provider), + }) + : []; const allowFrom = normalizeAllowList([...ctx.allowFrom, ...storeAllowFrom]); const allowFromLower = normalizeAllowListLower(allowFrom); return { allowFrom, allowFromLower }; diff --git a/src/slack/monitor/slash.ts b/src/slack/monitor/slash.ts index c653d4a0b..0f4a5e161 100644 --- a/src/slack/monitor/slash.ts +++ b/src/slack/monitor/slash.ts @@ -336,14 +336,13 @@ export async function registerSlackMonitorSlashCommands(params: { return; } - const storeAllowFrom = - isDirectMessage - ? await readStoreAllowFromForDmPolicy({ - provider: "slack", - dmPolicy: ctx.dmPolicy, - readStore: (provider) => readChannelAllowFromStore(provider), - }) - : []; + const storeAllowFrom = isDirectMessage + ? await readStoreAllowFromForDmPolicy({ + provider: "slack", + dmPolicy: ctx.dmPolicy, + readStore: (provider) => readChannelAllowFromStore(provider), + }) + : []; const effectiveAllowFrom = normalizeAllowList([...ctx.allowFrom, ...storeAllowFrom]); const effectiveAllowFromLower = normalizeAllowListLower(effectiveAllowFrom); diff --git a/src/web/auto-reply/monitor/process-message.ts b/src/web/auto-reply/monitor/process-message.ts index f1ed93d33..ce84d1352 100644 --- a/src/web/auto-reply/monitor/process-message.ts +++ b/src/web/auto-reply/monitor/process-message.ts @@ -76,15 +76,14 @@ async function resolveWhatsAppCommandAuthorized(params: { const configuredGroupAllowFrom = account.groupAllowFrom ?? (configuredAllowFrom.length > 0 ? configuredAllowFrom : undefined); - const storeAllowFrom = - isGroup - ? [] - : await readStoreAllowFromForDmPolicy({ - provider: "whatsapp", - dmPolicy, - readStore: (provider) => - readChannelAllowFromStore(provider, process.env, params.msg.accountId), - }); + const storeAllowFrom = isGroup + ? [] + : await readStoreAllowFromForDmPolicy({ + provider: "whatsapp", + dmPolicy, + readStore: (provider) => + readChannelAllowFromStore(provider, process.env, params.msg.accountId), + }); const dmAllowFrom = configuredAllowFrom.length > 0 ? configuredAllowFrom