protected void pushBlocklistUpdates( User user, Collection<JID> newBlocks )
    {
        if ( newBlocks.isEmpty() )
        {
            return;
        }

        Log.debug( "Pushing blocklist updates to all resources of user '{}' that have previously requested the blocklist.", user.getUsername() );

        final Collection<ClientSession> sessions = sessionManager.getSessions( user.getUsername() );
        for ( final ClientSession session : sessions )
        {
            if ( session.hasRequestedBlocklist() )
            {
                final IQ iq = new IQ( IQ.Type.set );
                iq.setTo( session.getAddress() );
                final Element block = iq.setChildElement( "unblock", NAMESPACE );
                for ( final JID newBlock : newBlocks )
                {
                    block.addElement( "item" ).addAttribute( "jid", newBlock.toString() );
                }

                XMPPServer.getInstance().getPacketRouter().route( iq );
            }
        }
    }
Sends an IQ-set with the newly blocked JIDs to all resources of the user that have requested the blocklist.

@param user      The for which updates are to be broadcasted (cannot be null).
@param newBlocks The JIDs for which an update needs to be sent (cannot be null, can be empty).
xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQBlockingHandler.java