0

how to send xmpp message to component? if my component name is 'abc.domain.net', in my xmpp client(spark), i just add user 'abc.domain.net' ? any such example that using whack to listen to message?

I tried add abc.domain.net (component) as roaster inside spark. try send message, but inside whack processPacket(), it didn't trigger anything when i do debugging

cometta
  • 35,071
  • 77
  • 215
  • 324

2 Answers2

3

You don't even need to add the user abc.domain.net, you can just send messages, iq or presence to abc.domain.net.

I'm not sure about whack, but components are basically "super-client", who don't implement any of the rules that regular clients have : you can rewrite from fields, they don't have presence or rosters built in.

So any stanza you send to a component should be received by it. You can them implement the component so it responds to specific stanzas and acts upon them the way you want.

Julien Genestoux
  • 31,046
  • 20
  • 66
  • 93
0

Also, I would like to add that you can add a component user to your buddies in any client without creating it anywhere.The user name just needs to be followed by a subdomain of a component. Event without authorization on a component side you can send messages to it.

Apollo91
  • 11
  • 2