Compare commits

..

2 commits

Author SHA1 Message Date
Christopher Cookman ddbff495b3 asdf 2025-06-23 17:41:31 -06:00
Christopher Cookman b8fecd731c Working branch go brr 2025-06-23 17:36:33 -06:00
2 changed files with 2 additions and 4 deletions

View file

@ -16,9 +16,7 @@ ws.on('message', (data) => {
try { try {
const msg = JSON.parse(data); const msg = JSON.parse(data);
// Assuming the message has 'channel' and 'product_id' fields // Assuming the message has 'channel' and 'product_id' fields
if (msg.channel && msg.product_data) { console.log(`Channel: ${msg.data.fromChannel}, Product ID: ${msg.product_data}`);
console.log(`Channel: ${msg.channel}, Product ID: ${msg.product_data}`);
}
} catch (err) { } catch (err) {
console.error('Error parsing message:', err); console.error('Error parsing message:', err);
} }

View file

@ -503,7 +503,7 @@ xmpp.on("stanza", (stanza) => {
const diff = (now - product_id.timestamp) / 1000 / 60; const diff = (now - product_id.timestamp) / 1000 / 60;
if (diff > 3) return; if (diff > 3) return;
// if (config.debug >= 1) console.log(`${colors.magenta("[DEBUG]")} New message from ${fromChannel}`); // if (config.debug >= 1) console.log(`${colors.magenta("[DEBUG]")} New message from ${fromChannel}`);
console.log(`${colors.cyan("[INFO]")} ${fromChannel} ${getWFOByRoom(fromChannel).location} - ${product_id_raw} - ${evt.text} - ${product_id.timestamp}`); console.log(`${colors.cyan("[INFO]")} ${getWFOByRoom(fromChannel).location} - ${product_id_raw} - ${evt.text} - ${product_id.timestamp}`);
messages++; messages++;
textTries = 0; textTries = 0;
tryGetText = () => { tryGetText = () => {