}
xmppSession.send(iq.createResult());
e.consume();
notifyListeners(pushedContacts, Collections.<Jid>emptyList());
} else {
Unblock unblock = iq.getExtension(Unblock.class);
if (unblock != null) {
List<Jid> pushedContacts = new ArrayList<>();
synchronized (blockedContacts) {
if (unblock.getItems().isEmpty()) {
// Empty means, the user has unblocked communications with all contacts.
pushedContacts.addAll(blockedContacts);
blockedContacts.clear();
} else {
for (Jid item : unblock.getItems()) {
blockedContacts.remove(item);
pushedContacts.add(item);
}
}
}