1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-29 07:22:07 +01:00
Smack/documentation/extensions/blockingcommand.md
2016-08-31 08:07:36 +02:00

978 B

Blocking Command

Allows to manage communications blocking.

  • Check push notifications support
  • Get blocking list
  • Block contact
  • Unblock contact
  • Unblock all

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.blockContact(jid);

jid is a Jid

Unblock contact

blockingCommandManager.unblockContact(jid);

jid is a Jid

Unblock all

blockingCommandManager.unblockAll();