public Presence createSubscribePresence(JID senderAddress, JID targetJID, boolean isSubscribe) {
        Presence presence = new Presence();
        presence.setFrom(senderAddress);
        presence.setTo(targetJID);
        if (isSubscribe) {
            presence.setType(Presence.Type.subscribe);
        }
        else {
            presence.setType(Presence.Type.unsubscribe);
        }
        return presence;
    }
A session that has transitioned to available status must be initialized.
This includes:
<ul>
<li>Sending all offline presence subscription requests</li>
<li>Sending offline messages</li>
</ul>

@param session The session being updated
@throws UserNotFoundException If the user being updated does not exist
xmppserver/src/main/java/org/jivesoftware/openfire/handler/PresenceUpdateHandler.java