XEP-0223: Persistent Storage of Private Data via PubSub¶
- class slixmpp.plugins.xep_0223.XEP_0223(xmpp, config=None)[source]¶
XEP-0223: Persistent Storage of Private Data via PubSub
If a specific pubsub node requires additional publish options, edit the
node_profileattribute of this plugin:self.xmpp.plugin["xep_0223"].node_profiles["urn:some:node"] = { "pubsub#max_items" = "max" }
This makes
store()add these publish options whenever it is called for theurn:some:nodenode.- configure(node, **iqkwargs)[source]¶
Update a node’s configuration to match the private storage profile.
- Parameters:
node (
str) – Node to set the configuration at.- Return type:
Future
- retrieve(node, id=None, item_ids=None, **iqkwargs)[source]¶
Retrieve private data via PEP.
This is just a (very) thin wrapper around the XEP-0060 publish() method to set the defaults expected by PEP.
- store(stanza, node=None, id=None, **pubsubkwargs)[source]¶
Store private data via PEP.
This is just a (very) thin wrapper around the XEP-0060 publish() method to set the defaults expected by PEP.
- Parameters:
stanza (
ElementBase) – The private content to store.node (
str|None) – The node to publish the content to. If not specified, the stanza’s namespace will be used.id (
str|None) – Optionally specify the ID of the item.options – Publish options to use, which will be modified to fit the persistent storage option profile.
- Return type:
Future