XMPP::Blocking
Blocking is a high-level client for XEP-0191 - Blocking Command.
Blocking lets a client prevent inbound communication from selected JIDs (or their bare-JID domains) by managing a server-side blocklist.
blocking = XMPP::Blocking.new(client) return unless blocking.supported? blocking.block("spammer@example.org") blocking.list # => [BlockItem(jid: "spammer@example.org")] blocking.unblock("spammer@example.org")
See: https://xmpp.org/extensions/xep-0191.html
Constants
Disco feature advertised by servers that support blocking.
Constructors
Instance methods
block blocks the given jids. Returns the result/error IQ (nil on timeout).
block is a convenience overload for a single JID.
list returns the JIDs currently blocked (as BlockItem), or nil on error.
supported? queries the server for blocking support and returns true when the urn:xmpp:blocking feature is advertised.
unblock unblocks the given jids. Returns the result/error IQ. When no jids are given the whole blocklist is cleared.
unblock is a convenience overload for a single JID.