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

Function rememberEvent

src/server.js:5727–5736  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

5725}
5726
5727function rememberEvent(key) {
5728 if (!key) return false;
5729 const now = Date.now();
5730 for (const [seenKey, seenAt] of seenOneBotMessageIds) {
5731 if (now - seenAt > seenMessageTtlMs) seenOneBotMessageIds.delete(seenKey);
5732 }
5733 if (seenOneBotMessageIds.has(key)) return true;
5734 seenOneBotMessageIds.set(key, now);
5735 return false;
5736}
5737
5738async function handleApi(req, res) {
5739 if (req.method === "OPTIONS") {

Callers 1

handleApiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected