Trim users resource as it might change each time
This commit is contained in:
parent
49015f3263
commit
8da6efb9d5
3
index.js
3
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user