ejabberd - Comments for "Using ad-hoc commands (xep xep-0050)" https://www.ejabberd.im/node/2639 en Anonymous wrote: Hello https://www.ejabberd.im/node/2639#comment-50976 <div class="quote-msg"> <div class="quote-author"><em>Anonymous</em> wrote:</div> <p>Hello there, </p> <p>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. </p></div> <p>There is. See section 11.1.4.3 of <noindex><a href="http://www.xmpp.org/rfcs/rfc3921.html#rules" rel="nofollow" >XMPP-IM</a></noindex>.</p> <div class="quote-msg"> <div class="quote-author"><em>Anonymous</em> wrote:</div> <p>For instance, supose the user <noindex><a href="mailto:bar@slack-lap.casa" rel="nofollow" >bar@slack-lap.casa</a></noindex> is querying <noindex><a href="mailto:foo@slack-lap.casa" rel="nofollow" >foo@slack-lap.casa</a></noindex> about the commands it supports:</p> <div class="codeblock"><code>&lt;iq type=&#039;get&#039;<br />&nbsp;&nbsp;&nbsp; from=&#039;bar@slack-lap.casa&#039;<br />&nbsp;&nbsp;&nbsp; to=&#039;foo@slack-lap.casa&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;http://jabber.org/protocol/disco#items&#039;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node=&#039;http://jabber.org/protocol/commands&#039;/&gt;<br />&lt;/iq&gt;</code></div> <p>The server responds in behalf of foo with an empty list:</p> <div class="codeblock"><code>&lt;iq from=&quot;foo@slack-lap.casa&quot; type=&quot;result&quot; to=&quot;bar@slack-lap.casa/Psi&quot; &gt;<br />&lt;query xmlns=&quot;http://jabber.org/protocol/disco#items&quot; node=&quot;http://jabber.org/protocol/commands&quot; /&gt;<br />&lt;/iq&gt;</code></div> </div> <p>If <code>bar@slack-lap.casa</code> had administrative privileges, it would see the administrative commands provided by the server. (But that's not relevant to your question)</p> <div class="quote-msg"> <div class="quote-author"><em>Anonymous</em> wrote:</div> <p>So, I can't understand how can I attach some commands to <noindex><a href="mailto:foo@slack-lap.casa" rel="nofollow" >foo@slack-lap.casa</a></noindex> and having other JIDs (like bar@) querying for these commands and execute them. I must be missing something...</p></div> <p>Send the disco query to the full JID, e.g. <code>foo@slack-lap.casa/Psi</code>.</p> Sun, 30 Sep 2007 08:17:05 +0000 legoscia comment 50976 at https://www.ejabberd.im