MCPcopy Create free account
hub / github.com/Epic0522/Codex-Remote-Contact / loadIMessageMemory

Function loadIMessageMemory

src/server.js:557–569  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555}
556
557async function loadIMessageMemory() {
558 await mkdir(dataDir, { recursive: true });
559 try {
560 const body = JSON.parse(await readFile(imessageMemoryPath, "utf8"));
561 if (body && typeof body === "object" && body.entries && typeof body.entries === "object") {
562 state.imessage.memory.entries = body.entries;
563 }
564 } catch (error) {
565 if (error.code !== "ENOENT") {
566 console.warn(`Unable to load iMessage memory: ${error.message}`);
567 }
568 }
569}
570
571async function saveIMessageMemory() {
572 await mkdir(dataDir, { recursive: true });

Callers 1

server.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected