Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
xmpp.on('online', async address => {
console.log('online as', address.toString())
// Sends a chat message to itself
const message = xml(
'message',
{type: 'chat', to: address},
xml('body', {}, 'hello world')
)
await xmpp.send(message)
})
xmpp.on('online', async address => {
console.log('online as', address.toString())
// Sends a chat message to itself
const message = xml(
'message',
{type: 'chat', to: address},
xml('body', {}, 'hello world')
)
await xmpp.send(message)
})