chore: sync source updates

This commit is contained in:
Peter Steinberger
2025-11-25 12:12:13 +01:00
parent ea745764d7
commit 800c7a1e1f
26 changed files with 462 additions and 376 deletions

View File

@@ -3,9 +3,8 @@ import os from "node:os";
import path from "node:path";
import JSON5 from "json5";
import { CONFIG_DIR, normalizeE164 } from "../utils.js";
import type { MsgContext } from "../auto-reply/templating.js";
import { CONFIG_DIR, normalizeE164 } from "../utils.js";
export type SessionScope = "per-sender" | "global";
@@ -22,7 +21,9 @@ export function resolveStorePath(store?: string) {
return path.resolve(store);
}
export function loadSessionStore(storePath: string): Record<string, SessionEntry> {
export function loadSessionStore(
storePath: string,
): Record<string, SessionEntry> {
try {
const raw = fs.readFileSync(storePath, "utf-8");
const parsed = JSON5.parse(raw);