@Override
    public boolean canFloodOfflineMessages() {
        // XEP-0160: When the recipient next sends non-negative available presence to the server, the server delivers the message to the resource that has sent that presence.
        if(offlineFloodStopped || presence.getPriority() < 0) {
            return false;
        }
        String username = getAddress().getNode();
        for (ClientSession session : sessionManager.getSessions(username)) {
            if (session.isOfflineFloodStopped()) {
                return false;
            }
        }
        return true;
    }
Returns true if the offline messages of the user should be sent to the user when
the user becomes online. If the user sent a disco request with node
"http://jabber.org/protocol/offline" before the available presence then do not
flood the user with the offline messages. If the user is connected from many resources
then if one of the sessions stopped the flooding then no session should flood the user.

@return true if the offline messages of the user should be sent to the user when the user
        becomes online.
@see <a href="http://www.xmpp.org/extensions/xep-0160.html">XEP-0160: Best Practices for Handling Offline Messages</a>
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalClientSession.java