ejabberd - Comments for "mod_ctlextra not working with mod_roster_odbc?" https://www.ejabberd.im/node/3356 en Some ideas https://www.ejabberd.im/node/3356#comment-55824 <div class="quote-msg"> <div class="quote-author"><em>crash2burn</em> wrote:</div> <p>Sending an IQ from a component without a "to" address errors out. </p></div> <p>IIRC, when a component sends an IQ without TO, ejabberd assumes the TO is the component himself.</p> <div class="quote-msg"> <div class="quote-author"><em>crash2burn</em> wrote:</div> <p>Putting the user as the "to" address does create a item in the roster, but with N set for all fields (ignores the ask and subscription fields). </p></div> <p>I don't see where that N comes from.</p> <div class="quote-msg"> <div class="quote-author"><em>crash2burn</em> wrote:</div> <p>Basically I want to put two users on eachothers rosters, with an xmpp component (without them even having to be online)? Any hint to wether this is actually possible would be great!</p></div> <p>[/quote]</p> <p>Some components (like transports) add contacts. You could install one of those, sniff the traffic they send to ejabberd, and reproduce it with your component.</p> <p>There is an option that may be useful, look in the ejabberd Guide: service_check_from</p> Fri, 28 May 2010 09:12:09 +0000 mfoss comment 55824 at https://www.ejabberd.im Was this ever solved? Sending https://www.ejabberd.im/node/3356#comment-55813 <p>Was this ever solved? Sending an IQ from a component without a "to" address errors out. Putting the user as the "to" address does create a item in the roster, but with N set for all fields (ignores the ask and subscription fields). Basically I want to put two users on eachothers rosters, with an xmpp component (without them even having to be online)? Any hint to wether this is actually possible would be great!</p> Wed, 26 May 2010 19:50:46 +0000 crash2burn comment 55813 at https://www.ejabberd.im error code 400 https://www.ejabberd.im/node/3356#comment-54101 <p>I've got the external module going and I've set service_check_from in ejabberd.cfg. </p> <p>I'm sending:</p> <div class="codeblock"><code>&lt;iq type=&#039;set&#039; id=&#039;add_f34827f1739e4af9580e5a209796b0da&#039; from=&#039;yml@host&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;query xmlns=&#039;jabber:iq:roster&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item jid=&#039;yermo@host&#039;&gt;&lt;group&gt;Friends&lt;/group&gt;<br />&lt;/item&gt; <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/query&gt;<br />&lt;/iq&gt;</p></code></div> <p>I'm getting an error: </p> <div class="codeblock"><code>&lt;iq type=&#039;error&#039; to=&#039;yml@host&#039; id=&#039;add_f34827f1739e4af9580e5a209796b0da&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;query xmlns=&#039;jabber:iq:roster&#039;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item jid=&#039;yermo@host&#039;&gt;&lt;group&gt;Friends&lt;/group&gt;<br />&lt;/item&gt; <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/query&gt;<br />&lt;error code=&#039;400&#039; type=&#039;modify&#039;&gt;&lt;bad-request xmlns=&#039;urn:ietf:params:xml:ns:xmpp-stanzas&#039;/&gt;&lt;/error&gt;&lt;/iq&gt;</p></code></div> <p>I'm sorry if this is a faq, but is there a list of error codes and their meanings somewhere I can refer to?</p> <p>thanks,</p> <p>-- Yermo</p> Tue, 24 Mar 2009 02:15:01 +0000 Yermo comment 54101 at https://www.ejabberd.im thanks! https://www.ejabberd.im/node/3356#comment-53947 <p>Cool, that's exactly what I needed to know. </p> <p>I'll use that from my external component and see how it goes. </p> <p>thanks!</p> Fri, 16 Jan 2009 06:05:01 +0000 Yermo comment 53947 at https://www.ejabberd.im Example stanza https://www.ejabberd.im/node/3356#comment-53946 <div class="quote-msg"> <div class="quote-author"><em>Yermo</em> wrote:</div> <p>Can I add items to a roster using a stanza from an external module? (I'm going to be writing one to intercept mod_service_log messages anyways)</p></div> <p>Maybe.</p> <p><noindex><a href="http://xmpp.org/internet-drafts/draft-saintandre-rfc3921bis-07.html#roster-add" rel="nofollow" >2.3. Adding a Roster Item</a></noindex></p> <p>In the account user@localhost add the contact tom@localhost. The client sends:</p> <pre> &lt;iq from='user@localhost/Tka' type='set'&gt; &lt;query xmlns='jabber:iq:roster'&gt; &lt;item jid='tom@localhost' name='Tom'&gt; &lt;group&gt;Friends&lt;/group&gt; &lt;/item&gt; &lt;/query&gt; &lt;/iq&gt; </pre><p> Or, sending the stanza directly inside ejabberd:</p> <pre> ejabberd_router:route( {jid,"user","localhost","","user","localhost",""}, {jid,"user","localhost","","user","localhost",""}, {xmlelement,"iq", [{"type","set"}], [{xmlelement,"query", [{"xmlns","jabber:iq:roster"}], [{xmlelement,"item", [{"jid","tom@localhost"},{"name","Tom"}], [{xmlelement,"group",[],[{xmlcdata,"Friends"}]}]}]}]}). </pre><p> If you send the stanza from an external component, you may be interested in the option service_check_from:<br /> <noindex><a href="https://support.process-one.net/browse/EJAB-275" rel="nofollow" >Component should be allowed to send packets on behalf of users</a></noindex></p> Thu, 15 Jan 2009 19:18:26 +0000 mfoss comment 53946 at https://www.ejabberd.im How to add items to mod_roster_odbc https://www.ejabberd.im/node/3356#comment-53937 <p>Is there a mechanism for adding roster items from an external source? (i.e. PHP script?) I'm assuming modifying the database directly is A Very Bad Thing(tm). </p> <p>I was looking at mod_xmlrpc but it seems that's currently a hack.</p> <p>Can I add items to a roster using a stanza from an external module? (I'm going to be writing one to intercept mod_service_log messages anyways)</p> <p>Basically I want to be able to add roster items from a webpage.</p> Wed, 14 Jan 2009 22:21:15 +0000 Yermo comment 53937 at https://www.ejabberd.im Not implemented https://www.ejabberd.im/node/3356#comment-53931 <p>The roster management part of Web Admin is implemented in mod_roster and mod_roster_odbc.</p> <p>However, mod_ctlextra (and the successor mod_admin_extra) implements only support for internal Mnesia storage (used by mod_roster).</p> <p>I don't have any short term plan to implement that.</p> Wed, 14 Jan 2009 12:09:09 +0000 mfoss comment 53931 at https://www.ejabberd.im