From 8da6efb9d58c334a3492c9b60aec2a24f570cd19 Mon Sep 17 00:00:00 2001
From: stephen <stephen@vanderwarker.family>
Date: Sun, 2 Feb 2025 13:53:56 -0500
Subject: [PATCH] Trim users resource as it might change each time

---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 50a5467..b653cff 100644
--- a/index.js
+++ b/index.js
@@ -70,7 +70,8 @@ if (fs.existsSync(configPath)) {
     // check for chat messages
     if (stanza.is('message') && stanza.attrs.type === 'chat') {
       // store from jid, and message contents
-      const from = stanza.attrs.from;
+      const rawfrom = stanza.attrs.from;
+      const from = rawfrom.split('/')[0];
       const body = stanza.getChildText('body');
 
       // show them to the user in console