God these logs are gonna be the END OF ME

This commit is contained in:
Christopher Cookman 2026-05-06 18:47:51 -06:00
parent 0e64a9f0c8
commit 0752221b85

View file

@ -457,7 +457,7 @@ xmpp.on("stanza", (stanza) => {
const bodyData = getFirstURL(body); const bodyData = getFirstURL(body);
// get product id from "x" tag // get product id from "x" tag
var evt = events[product_id.pil.substring(0, 3)]; var evt = events[product_id.pil.substring(0, 3)];
if (process.env.LOG_EVENTS === "true") {
// Log the full event object to a file named "productid-timestamp-channelname.json" // Log the full event object to a file named "productid-timestamp-channelname.json"
const nowDate = new Date(); const nowDate = new Date();
const year = nowDate.getFullYear(); const year = nowDate.getFullYear();
@ -481,6 +481,7 @@ xmpp.on("stanza", (stanza) => {
return value; return value;
}; };
}; };
}
if (!evt) { if (!evt) {
evt = { name: "Unknown", priority: 3 } evt = { name: "Unknown", priority: 3 }