XMPP::PEP
PEP is a high-level client for XEP-0163 - Personal Eventing Protocol.
PEP lets a user publish items on their own pubsub nodes and subscribe to the nodes of other contacts. The server advertises PEP support with the disco feature "http://jabber.org/protocol/pubsub#pep".
Incoming notifications arrive as Message stanzas carrying a Stanza::PubSubEvent payload and are handled like any other message:
client.on("message") do |s, p| if event = p.as(XMPP::Stanza::Message).get(XMPP::Stanza::PubSubEvent) # event.items.node, event.items.items ... end end
See: https://xmpp.org/extensions/xep-0163.html
Constants
Disco feature advertised by servers that support PEP.
Constructors
Instance methods
publish sends an item to one of the client's own nodes. The item payload is a Stanza::Item (typically carrying a Tune or Mood).
publish_with_options sends an item together with a publish-options form (XEP-0410), configuring the node (e.g. its access model) at publish time.
subscribe subscribes the client to a node owned by the given bare JID.
supported? queries the server for PEP support on the client's own bare JID and returns true when PEP is advertised. Per XEP-0163 ยง4.1 a PEP server advertises the disco identity pubsub/pep; the http://jabber.org/protocol/pubsub#pep feature is a common extra signal.