Format: apply oxfmt fixes

This commit is contained in:
George Pickett
2026-01-14 17:10:16 -08:00
committed by Peter Steinberger
parent 8c1e6a82b2
commit 232c512502
14 changed files with 202 additions and 234 deletions

View File

@@ -116,7 +116,12 @@ export function resolveCommandAuthorization(params: {
const ownerCandidates = allowAll ? [] : allowFromList.filter((entry) => entry !== "*");
if (!allowAll && ownerCandidates.length === 0 && to) {
const normalizedTo = normalizeAllowFromEntry({ dock, cfg, accountId: ctx.AccountId, value: to });
const normalizedTo = normalizeAllowFromEntry({
dock,
cfg,
accountId: ctx.AccountId,
value: to,
});
if (normalizedTo) ownerCandidates.push(normalizedTo);
}
const ownerList = ownerCandidates;

View File

@@ -26,7 +26,7 @@ export function buildThreadingToolContext(params: {
const dock = getChannelDock(provider);
if (!dock?.threading?.buildToolContext) return {};
// WhatsApp context isolation keys off conversation id, not the bot's own number.
const threadingTo = provider === "whatsapp" ? sessionCtx.From ?? sessionCtx.To : sessionCtx.To;
const threadingTo = provider === "whatsapp" ? (sessionCtx.From ?? sessionCtx.To) : sessionCtx.To;
return (
dock.threading.buildToolContext({
cfg: config,

View File

@@ -9,9 +9,7 @@ import { initSessionState } from "./session.js";
describe("initSessionState reset triggers in WhatsApp groups", () => {
async function createStorePath(prefix: string): Promise<string> {
const root = await fs.mkdtemp(
path.join(os.tmpdir(), prefix),
);
const root = await fs.mkdtemp(path.join(os.tmpdir(), prefix));
return path.join(root, "sessions.json");
}