Server Processing of Inbound Unsubscribe - unavailable presence does not send

Based on the Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence

3.3.3. Server Processing of Inbound Unsubscribe

  1. Generate an outbound presence stanza of type “unavailable” from each of the contact’s available resources to the user.
CS: <presence from='juliet@example.com/balcony' id='o5v91w49' to='romeo@example.net' type='unavailable'/>  CS: <presence from='juliet@example.com/chamber' id='n6b1c37k' to='romeo@example.net' type='unavailable'/>

It seems openfire does not send out the unavailable presence from the inbound when user unsubscribe the contact.

in java.org.jivesoftware.openfire.handler.PresenceSubscribeHandler.java line 227

if (type == Presence.Type.unsubscribed) {

// Send unavailable presence from all of the local user’s available resources

// to the remote user

presenceManager.sendUnavailableFromSessions(recipientJID, senderJID);

PresenceEventDispatcher.unsubscribedToPresence(senderJID, recipientJID);

}

It would only send the unavailable when type equal to unsubscribed. However. the type is always unsubscribe in unsubscribing situation.

Does anyone has a clue?

The unavailable seems not much use.

Thanks in advance.