XMPP::PrivateXmlStorage
PrivateXmlStorage is a high-level client for XEP-0049 - Private XML Storage.
Private XML storage lets a client persist small amounts of arbitrary XML on the server, keyed by an element's namespace/local name. Stored data is exchanged as a generic Stanza::Node, so any payload can round-trip.
storage = XMPP::PrivateXmlStorage.new(client) storage.store("storage:bookmarks", "storage", "example")
stored = storage.retrieve("storage:bookmarks", "storage")
See: https://xmpp.org/extensions/xep-0049.html
Constants
Namespace of the private-storage query wrapper.
Constructors
Instance methods
retrieve returns the stored element matching the given namespace and local name as a generic Stanza::Node, or nil when unset (or on error or timeout). The get request carries an empty element so the server knows which data to return.
store is a convenience overload that builds a simple element with the given namespace, local name, and text content.
store persists the given element on the server. Returns the result/error IQ (nil on timeout); callers check type == "result".