Hello there,
I'm playing with ad-hoc commands (xep-0050), but I'm unable to understand how to announce/publish and execute commands. I'm sending queries from one client to another, and the server answer in behalf of the responder (which never receives the request). So, I'm not sure if I understand correctly the xep, or if there is something different about the server.
For instance, supose the user
<iq type='get'
from='bar@slack-lap.casa'
to='foo@slack-lap.casa'>
<query xmlns='http://jabber.org/protocol/disco#items'
node='http://jabber.org/protocol/commands'/>
</iq>
The server responds in behalf of foo with an empty list:
<iq from="foo@slack-lap.casa" type="result" to="bar@slack-lap.casa/Psi" >
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/commands" />
</iq>
So,
So, I can't understand how can I attach some commands to
Can anyone help? (using ejabberd 1.1.4)
Thannks,
Thiago
Anonymous wrote: Hello
Hello there,
I'm playing with ad-hoc commands (xep-0050), but I'm unable to understand how to announce/publish and execute commands. I'm sending queries from one client to another, and the server answer in behalf of the responder (which never receives the request). So, I'm not sure if I understand correctly the xep, or if there is something different about the server.
There is. See section 11.1.4.3 ofXMPP-IM .
For instance, supose the userbar@slack-lap.casa is querying foo@slack-lap.casa about the commands it supports:
<iq type='get'
from='bar@slack-lap.casa'
to='foo@slack-lap.casa'>
<query xmlns='http://jabber.org/protocol/disco#items'
node='http://jabber.org/protocol/commands'/>
</iq>
The server responds in behalf of foo with an empty list:
<iq from="foo@slack-lap.casa" type="result" to="bar@slack-lap.casa/Psi" >
<query xmlns="http://jabber.org/protocol/disco#items" node="http://jabber.org/protocol/commands" />
</iq>
If
bar@slack-lap.casa
had administrative privileges, it would see the administrative commands provided by the server. (But that's not relevant to your question)So, I can't understand how can I attach some commands tofoo@slack-lap.casa and having other JIDs (like bar@) querying for these commands and execute them. I must be missing something...
Send the disco query to the full JID, e.g.
foo@slack-lap.casa/Psi
.