chore: apply lint fixes
This commit is contained in:
@@ -135,7 +135,10 @@ describe("trigger handling", () => {
|
||||
expect(text).toContain("Send policy set to off");
|
||||
|
||||
const storeRaw = await fs.readFile(cfg.session.store, "utf-8");
|
||||
const store = JSON.parse(storeRaw) as Record<string, { sendPolicy?: string }>;
|
||||
const store = JSON.parse(storeRaw) as Record<
|
||||
string,
|
||||
{ sendPolicy?: string }
|
||||
>;
|
||||
expect(store.main?.sendPolicy).toBe("deny");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,9 +64,9 @@ import {
|
||||
normalizeGroupActivation,
|
||||
parseActivationCommand,
|
||||
} from "./group-activation.js";
|
||||
import { parseSendPolicyCommand } from "./send-policy.js";
|
||||
import { stripHeartbeatToken } from "./heartbeat.js";
|
||||
import { extractModelDirective } from "./model.js";
|
||||
import { parseSendPolicyCommand } from "./send-policy.js";
|
||||
import { buildStatusMessage } from "./status.js";
|
||||
import type { MsgContext, TemplateContext } from "./templating.js";
|
||||
import {
|
||||
@@ -1639,9 +1639,7 @@ export async function getReplyFromConfig(
|
||||
|
||||
if (sendPolicyCommand.hasCommand) {
|
||||
if (!isOwnerSender) {
|
||||
logVerbose(
|
||||
`Ignoring /send from non-owner: ${senderE164 || "<unknown>"}`,
|
||||
);
|
||||
logVerbose(`Ignoring /send from non-owner: ${senderE164 || "<unknown>"}`);
|
||||
cleanupTyping();
|
||||
return undefined;
|
||||
}
|
||||
@@ -1754,9 +1752,7 @@ export async function getReplyFromConfig(
|
||||
chatType: sessionEntry?.chatType,
|
||||
});
|
||||
if (sendPolicy === "deny") {
|
||||
logVerbose(
|
||||
`Send blocked by policy for session ${sessionKey ?? "unknown"}`,
|
||||
);
|
||||
logVerbose(`Send blocked by policy for session ${sessionKey ?? "unknown"}`);
|
||||
cleanupTyping();
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user