protected Set<JID> removeFromBlockList( User user, Collection<JID> toUnblocks )
    {
        final Set<JID> result = new HashSet<>();
        if ( toUnblocks == null || toUnblocks.isEmpty() )
        {
            return result;
        }

        Log.debug( "Obtain the default privacy list for '{}'", user.getUsername() );
        PrivacyList defaultPrivacyList = PrivacyListManager.getInstance().getDefaultPrivacyList( user.getUsername() );
        if ( defaultPrivacyList == null )
        {
            return result;
        }

        Log.debug( "Removing {} JIDs as blocked items from list '{}' (belonging to '{}')", toUnblocks.size(), defaultPrivacyList.getName(), user.getUsername() );
        final Element listElement = defaultPrivacyList.asElement();
        final Set<Element> toRemove = new HashSet<>();
        for ( final Element element : listElement.elements( "item" ) )
        {
            final JID jid = new JID( element.attributeValue( "value" ) );
            if ( "jid".equals( element.attributeValue( "type" ) )
                && "deny".equals( element.attributeValue( "action" ) )
                && toUnblocks.contains( jid ) )
            {
                toRemove.add( element );
                result.add( jid );
            }
        }

        if ( !toRemove.isEmpty() )
        {
            for ( final Element remove : toRemove )
            {
                listElement.remove( remove );
            }

            defaultPrivacyList.updateList( listElement );
            PrivacyListProvider.getInstance().updatePrivacyList( user.getUsername(), defaultPrivacyList );
        }

        return result;
    }
Removes a collection of JIDs from the blocklist of the provided user.

This method removes the JIDs to the default privacy list. When no default privacy list exists for this user, this
method does nothing.

@param user       The owner of the blocklist to which JIDs are to be added (cannot be null).
@param toUnblocks The JIDs to be removed (can be null, which results in a noop).
@return The JIDs that are removed (never null, possibly empty).
xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQBlockingHandler.java