XEP-0163: Personal Eventing Protocol (PEP)#

class slixmpp.plugins.xep_0163.XEP_0163(xmpp, config=None)[source]#

XEP-0163: Personal Eventing Protocol (PEP)

add_interest(namespace, jid=None)[source]#

Mark an interest in a PEP subscription by including a disco feature with the ‘+notify’ extension.

Parameters
  • namespace (str) – The base namespace to register as an interest, such as ‘http://jabber.org/protocol/tune’. This may also be a list of such namespaces.

  • jid (Optional[JID]) – Optionally specify the JID.

publish(stanza, node=None, id=None, options=None, ifrom=None, timeout_callback=None, callback=None, timeout=None)[source]#

Publish a PEP update.

This is just a (very) thin wrapper around the XEP-0060 publish() method to set the defaults expected by PEP.

Parameters
  • stanza (ElementBase) – The PEP update stanza to publish.

  • node (Optional[str]) – The node to publish the item to. If not specified, the stanza’s namespace will be used.

  • id (Optional[str]) – Optionally specify the ID of the item.

  • options (Optional[Form]) – A form of publish options.

register_pep(name, stanza)[source]#

Setup and configure events and stanza registration for the given PEP stanza:

  • Add disco feature for the PEP content.

  • Register disco interest in the PEP content.

  • Map events from the PEP content’s namespace to the given name.

Parameters
  • name (str) – The event name prefix to use for PEP events.

  • stanza – The stanza class for the PEP content.

remove_interest(namespace, jid=None)[source]#

Mark an interest in a PEP subscription by including a disco feature with the ‘+notify’ extension.

Parameters
  • namespace (str) – The base namespace to remove as an interest, such as ‘http://jabber.org/protocol/tune’. This may also be a list of such namespaces.

  • jid (Optional[JID]) – Optionally specify the JID.