ejabberd - Comments for "Roster Subscription Problem" https://www.ejabberd.im/node/1400 en right, that's where it https://www.ejabberd.im/node/1400#comment-3347 <p>right, that's where it becomes not RFC Compliant:</p> <p>RFC 3921<br /> Page: 32<br /> Section: 8.1<br /> The server MUST NOT send presence subscription requests or roster<br /> pushes to unavailable resources, nor to available resources that have<br /> not requested the roster.</p> <p>Basically what ejabberd is doing is:<br /> 1. client1 sends a subscription request to client2<br /> 2. server pushes client1 to client2's roster with subscription none. [while client2 didn't request it.]</p> Tue, 13 Mar 2007 20:52:46 +0000 guntanis comment 3347 at https://www.ejabberd.im The problem is that ejabberd https://www.ejabberd.im/node/1400#comment-3345 <p>The problem is that ejabberd stores incoming subscription requests in users' rosters. So, if you want to fix it you have to store them somwhere else (in a separate table).</p> Tue, 13 Mar 2007 17:07:38 +0000 teo comment 3345 at https://www.ejabberd.im True https://www.ejabberd.im/node/1400#comment-3302 <p>True,<br /> For some reason when I tested it the first time it worked. Later on I tried and didn't work.<br /> I'm trying to make it work, if anyone of you has any pointers please let me know.<br /> If I get it to work, I'll post the _real_ fix :P</p> <p>Thanks</p> <p>Jorge</p> Mon, 12 Mar 2007 23:50:06 +0000 guntanis comment 3302 at https://www.ejabberd.im The only impact of this https://www.ejabberd.im/node/1400#comment-3292 <p>The only impact of this "fix" is that clients will never get or set roster items.</p> Fri, 09 Mar 2007 10:51:49 +0000 teo comment 3292 at https://www.ejabberd.im thank you ! https://www.ejabberd.im/node/1400#comment-3291 <p>Hello,</p> <p>Thank you. We will have a look at this code and we will make some more testing with various client on it.</p> <p>--<br /> Mickaël Rémond<br /> <noindex><a href="http://www.process-one.net/" rel="nofollow" >Process-one</a></noindex></p> Fri, 09 Mar 2007 08:48:44 +0000 mremond comment 3291 at https://www.ejabberd.im Fixed. https://www.ejabberd.im/node/1400#comment-3288 <p>mod_roster.erl<br /> Current Code:</p> <pre>-ifdef(PSI_ROSTER_WORKAROUND). process_iq(From, To, IQ) -&gt; #iq{sub_el = SubEl} = IQ, #jid{lserver = LServer} = From, case lists:member(LServer, ?MYHOSTS) of true -&gt; ResIQ = process_local_iq(From, To, IQ), ejabberd_router:route(From, From, jlib:iq_to_xml(ResIQ)), ignore; _ -&gt; IQ#iq{type = error, sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]} end. -else.</pre><p> CODE THAT FIX THE BEHAVIOR DESCRIBED IN THE LAST POST</p> <pre>-ifdef(PSI_ROSTER_WORKAROUND). process_iq(From, To, IQ) -&gt; #iq{sub_el = SubEl} = IQ, #jid{lserver = LServer} = From, case lists:member(LServer, ?MYHOSTS) of true -&gt; ResIQ = process_local_iq(From, To, IQ), ejabberd_router:route(From, To, jlib:iq_to_xml(ResIQ)), ignore; _ -&gt; IQ#iq{type = error, sub_el = [SubEl, ?ERR_ITEM_NOT_FOUND]} end. -else.</pre><p> This might help someone in the future, I don't know if psi will behave correctly, but this will make it RFC compliant.</p> <p>Cheers!<br /> Jorge Guntanis</p> Fri, 09 Mar 2007 00:04:51 +0000 guntanis comment 3288 at https://www.ejabberd.im