Bug in Cancelling Subscription?

Hi all.

I’m using smack API & Openfire server to implement an AJAX client for jabber.

When i’m trying to cancel the subscription of a contact (sending a presence stanza with type UNSUBSCRIBED to him/her), the server replies to me sending the IQ stanza (roster push) below:

  • if the subscription is not mutual (the contact’s subscription status, before sending the UNSUBSCRIBED packet, was FROM):

<iq type=‘set’>
<query xmlns=“jabber:iq:roster”>
<item jid=“pippo2@studio”
name=“pippo2name”
subscription=“none”
ask=“subscribe” >
</item>
</query>
</iq>

  • if the subscription is mutual (the contact’s subscription status, before sending the UNSUBSCRIBED packet, was BOTH):

<iq type=‘set’>
<query xmlns=“jabber:iq:roster”>
<item jid=“pippo2@studio”
name=“pippo2name”
subscription=“from”
ask=“subscribe” >
</item>
</query>
</iq>

Note the ask=“subscribe” attribute.


The RFCS at section “8.5.1. Case #1: Cancelling When Subscription is Not Mutual” says:

(…)

3) Upon receiving the presence stanza of type “unsubscribed” addressed to the user, the user’s server (1) MUST initiate a roster push to all of the user’s available resources that have requested the roster, containing an updated roster item for the contact with the ‘subscription’ attribute set to a value of “none” (if the user is unavailable or has not requested the roster, the user’s server MUST modify the roster item and send that modified item the next time the user requests the roster); (2) MUST deliver the “unsubscribed” state change notification to all of the user’s available resources; and (3) MUST deliver the unavailable presence to all of the user’s available resources:

<iq type=‘set’>
+<query xmlns=‘jabber:iq:roster’>+
+<item+
+jid=‘contact@example.org’+
+subscription=‘none’+
+name=‘MyContact’>+
+<group>MyBuddies</group>+
+</item>+
+</query>+
+</iq>+

(…)

Almost the same at section “8.5.2. Case #2: Cancelling When Subscription is Mutual”:

(…)

3) Upon receiving the presence stanza of type “unsubscribed” addressed to the user, the user’s server (1) MUST initiate a roster push to all of the user’s available resources that have requested the roster, containing an updated roster item for the contact with the ‘subscription’ attribute set to a value of “from” (if the user is unavailable or has not requested the roster, the user’s server MUST modify the roster item and send that modified item the next time the user requests the roster); and (2) MUST deliver the “unsubscribed” state change notification to all of the user’s available resources; and (3) MUST deliver the unavailable presence to all of the user’s available resources:

<iq type=‘set’>
+<query xmlns=‘jabber:iq:roster’>+
+<item+
+jid=‘contact@example.org’+
+subscription=‘from’+
+name=‘MyContact’>+
+<group>MyBuddies</group>+
+</item>+
+</query>+
+</iq>+

(…)

No mention of the attribute ask =‘subscribe’…

Is this an openfire bug? Or I misunderstand something?

Byez all,

Gaetano S.