cometta
cometta

Reputation: 35679

send message to component?

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

Upvotes: 0

Views: 861

Answers (2)

Apollo91
Apollo91

Reputation: 21

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.

Upvotes: 0

Julien Genestoux
Julien Genestoux

Reputation: 32952

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.

Upvotes: 3

Related Questions