Blocking Command

Back

Allows one to manage communications blocking.

XEP related: XEP-0191

Get an instance of Blocking Command Manager

BlockingCommandManager blockingCommandManager = BlockingCommandManager.getInstanceFor(connection);

Check blocking command support

boolean isSupported = blockingCommandManager.isSupportedByServer();

Get block list

List<Jid> blockList = blockingCommandManager.getBlockList();

Block contact

blockingCommandManager.blockContacts(jids);

jids is a java.util.List<Jid>

Unblock contact

blockingCommandManager.unblockContacts(jids);

jids is a java.util.List<Jid>

Unblock all

blockingCommandManager.unblockAll();

Check if a message has a blocked error

BlockedErrorExtension.isInside(message));

message is a Message