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: ---------------------------------------------------------------------------- 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"? 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? Thanks a lot. -- Iñaki Baz Castillo <[email protected]>
