How to use the @xmpp/component.xml function in @xmpp/component

To help you get started, we’ve selected a few @xmpp/component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xmppjs / xmpp.js / packages / component / example.js View on Github external
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)
})
github xmppjs / xmpp.js / packages / component / example.js View on Github external
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/component

XMPP component for JavaScript

ISC
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis