Format: apply oxfmt fixes
This commit is contained in:
committed by
Peter Steinberger
parent
8c1e6a82b2
commit
232c512502
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user