XMPP::Push
Push is a high-level client for XEP-0357 - Push Notifications.
A client registers an app server (push service) with its own server so the server can notify the app server when a message arrives for a hibernating or offline session. Support is discovered via disco on the user's bare JID; enable/disable are IQ-sets addressed to the user's bare JID.
push = XMPP::Push.new(client) return unless push.supported? push.enable("push-5.client.example", "yxs32uqsflafdk3iuqo") push.disable("push-5.client.example")
See: https://xmpp.org/extensions/xep-0357.html
Constants
Disco feature advertised by servers that support push notifications.
Constructors
Instance methods
disable removes the push registration for the given push service (jid), optionally narrowed to a specific node. Returns the result/error IQ (nil on timeout).
enable registers the given push service (jid) and app-specific node with the server and returns the matching result/error IQ (nil on timeout). Callers check the returned IQ's type == "result".
supported? queries the server for push support on the client's own bare JID and returns true when the urn:xmpp:push:0 feature is advertised (XEP-0357 ยง4.1).