On 9/10/10 10:55 AM, Iñaki Baz Castillo wrote:
> Hi, when a resource wants to subscribe to the presence of a contact it sends:
> 
>   <presence to='[email protected]' type='subscribe'/>
> 
> and then, as stated in RFC 3291 section 8.2 point 4:

Please read the most up-to-date specification:

http://tools.ietf.org/html/draft-ietf-xmpp-3921bis-12

That document is currently in Working Group Last Call at the IETF and I
will public version -13 very soon (perhaps even today), which will be
the version that goes to IETF Last Call. After IETF Last Call the IESG
will vote on approving it, after which it will replace RFC 3921.

> ----------------------------------------------------------------------------
> 4. As a result, the user's server MUST initiate a second roster push
> to all of the user's available resources that have requested the
> roster, setting the contact to the pending sub-state of the 'none'
> subscription state; this pending sub-state is denoted by the inclusion
> of the ask='subscribe' attribute in the roster item:
> 
> <iq type='set'>
>   <query xmlns='jabber:iq:roster'>
>     <item
>         jid='[email protected]'
>         subscription='none'
>         ask='subscribe'
>         name='MyContact'>
>       <group>MyBuddies</group>
>     </item>
>   </query>
> </iq>
> ----------------------------------------------------------------------------
> 
> 
> My question is: why does the server add "ask=subscribe" before roster
> pushing to all the other resources? Why doesn't it avoid "ask" and
> instead set "subscription=None + Pending Out"? 

Because that's the way it's been since 1999.

> This is:
> 
> ----------------------------------------------------------------------------
> <iq type='set'>
>   <query xmlns='jabber:iq:roster'>
>     <item
>         jid='[email protected]'
>         subscription='none + prending out'
>         name='MyContact'>
>       <group>MyBuddies</group>
>     </item>
>   </query>
> </iq>
> ----------------------------------------------------------------------------
> 
> 
> When a resource receives this push it can know that other resource has
> requested subscription by inspecting the subscription 'none + prending
> out', am I wrong? which is the use case of "ask=subscribe" then?

You're asking that we change a core part of the protocol for the sake of
syntactic hygiene. That's simply not going to happen at this point, but
feel free to raise the issue on the XMPP WG list, which is the
appropriate venue for discussion of the XMPP RFCs.

https://www.ietf.org/mailman/listinfo/xmpp

Peter

-- 
Peter Saint-Andre
https://stpeter.im/


Reply via email to