annotate mod_push2/push2.md @ 6183:e53f0967520c

mod_push: Allow filtering pushes for particular chats
author Stephen Paul Weber <singpolyma@singpolyma.net>
date Mon, 24 Mar 2025 13:01:05 -0500
parents aa240145aa22
children 2f2539ce8f3b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5659
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
1 # Push 2.0
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
2
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
3 Adapted from notes made at [XMPP Summit 25](https://pad.nixnet.services/oy6MKVbESSycLeMJIOh6zw).
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
4
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
5 Requirements:
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
6
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
7 - Support for SASL2 inlining
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
8 - Extensible stanza matching rules and notification payload rules
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
9 - Simpler syntax and concept model than original specification
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
10
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
11 ## Client registers to receive push notifications
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
12
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
13 ```xml
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
14 <enable xmlns='urn:xmpp:push2:0'>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
15 <service>pusher@push.example.com</service>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
16 <client>https://push.example.com/adlfkjadafdasf</client>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
17 <match profile="urn:xmpp:push2:match:archived-with-body">
6183
e53f0967520c mod_push: Allow filtering pushes for particular chats
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 6162
diff changeset
18 <chat jid="somemuc@conference.example.com">
e53f0967520c mod_push: Allow filtering pushes for particular chats
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 6162
diff changeset
19 <mention/>
e53f0967520c mod_push: Allow filtering pushes for particular chats
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 6162
diff changeset
20 </chat>
5659
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
21 <send xmlns="urn:xmpp:push2:send:notify-only:0"/>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
22 </match>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
23 </enable>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
24 ```
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
25
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
26 The `<service/>` element contains a JID which push notifications for this client will be sent to. It may be a host, bare or full JID.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
27
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
28 The `<client/>` element contains an opaque string that will be included in all communication with the push service. It may be used to convey client identifiers used by the push notification service to route notifications.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
29
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
30 The `<match/>` and `<send/>` elements define what profiles to use for matching stanzas and sending notifications. These are described later in this document.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
31
6183
e53f0967520c mod_push: Allow filtering pushes for particular chats
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 6162
diff changeset
32 The optional `<chat/>` child of `<match/>` allows extra filtering of pushes for only specific chats. No specified filters means muted, do not push. `<mention/>` means push on mentions, `<reply/>` means push on replies.
e53f0967520c mod_push: Allow filtering pushes for particular chats
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 6162
diff changeset
33
5659
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
34 ## Match and send profiles
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
35
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
36 Different clients and push services have different requirements for push notifications, often due to the differing capabilities of target platforms.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
37
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
38 A "profile" in the context of this specification is a set of rules for matching the kinds of stanzas that should be pushed, and how to transform them before sending the notification to the push service.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
39
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
40 ### Match profiles
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
41
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
42 Match profiles define which incoming stanzas will trigger a push notification. More than one match may be specified.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
43
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
44 Some match profiles are defined in this XEP. Other XEPs may define additional profiles with the reserved `urn:xmpp:push2:match:` prefix, following the registrar considerations explained later in this document. Custom profiles not defined in a XEP should use their own appropriate URI.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
45
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
46 #### `urn:xmpp:push2:match:all`
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
47
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
48 Using this profile, all stanzas will trigger a push notification to be sent to the push service when the client is unavailable.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
49
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
50 #### `urn:xmpp:push2:match:important`
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
51
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
52 Stanzas that are considered to be "important" are pushed. At the time of writing, there is no standard definition of "important", however most servers already contain such logic for traffic optimization when combined with [XEP-0352: Client State Indication](https://xmpp.org/extensions/xep-0352.html).
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
53
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
54 #### `urn:xmpp:push2:match:archived`
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
55
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
56 Push notifications will be sent for any stanza that is stored in the user's archive. This is a good indication that the stanza is important, and is desired on all of a user's devices.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
57
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
58 #### `urn:xmpp:push2:match:archived-with-body`
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
59
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
60 Matches only archived messages that contain a body. This can be used to exclude certain message types, such as typing notifications, receipts and error replies.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
61
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
62 ### Send profiles
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
63
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
64 When a server has determined that a stanza should trigger a push notification (according to the client's selected 'match' profile), it proceeds to create a notification stanza following the send profiles specified in the match profiles which match this stanza.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
65
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
66 After constructing the notification stanza, it will then be sent to the push service JID selected by the client.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
67
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
68 Some send profiles are defined in this XEP. Other XEPs may define additional profiles with the `urn:xmpp:push2:send:` prefix, following the registrar considerations explained later in this document. Custom profiles not defined in a XEP should use their own appropriate URI.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
69
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
70 #### `urn:xmpp:push2:send:notify-only:0`
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
71
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
72 Send an empty notification to the push service. Such notifications are useful if a push notification can trigger the client to "wake up" and connect to the server to receive the message over XMPP.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
73
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
74 Example:
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
75
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
76 ```xml
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
77 <message to="pusher@push.example.net">
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
78 <notification xmlns="urn:xmpp:push2:0">
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
79 <client>https://push.example.com/adlfkjadafdasf</client>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
80 <priority>normal</priority>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
81 </notification>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
82 </message>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
83 ```
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
84
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
85 #### `urn:xmpp:push2:send:sce+rfc8291+rfc8292:0`
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
86
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
87 Delivers content encrypted according to RFC8291 and with a JWT auth following RFC8292
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
88
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
89 ```xml
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
90 <send xmlns="urn:xmpp:push2:send:sce+rfc8291+rfc8292:0">
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
91 <ua-public>Base64 encoded P-256 ECDH public key (raw, uncompressed)</ua-public>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
92 <auth-secret>Base64 encoded randomly generated 16 octets</auth-secret>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
93 <jwt-alg>ES256</jwt-alg>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
94 <jwt-key>PKCS#8 PEM encoded ECDSA keypair, without the header or footer lines</jwt-key>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
95 <jwt-claim name="aud">https://push.example.com</jwt-claim>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
96 </send>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
97 ```
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
98
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
99 The full stanza is wrapped in XEP-0297 forwarded and then that is wrapped in XEP-0420 envelope/content with optional rpad. The raw bytes of the resulting XML are encrypted according to RFC8291 using the provided `ua-public` and `auth-secret`.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
100
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
101 If `jwt-alg` is specified, then a JWT is computed over any provided claims plus a suitable `exp` and `sub` claim and signed using the provided key.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
102
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
103 Then a notification is sent:
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
104
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
105 ```xml
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
106 <message to="pusher@push.example.net">
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
107 <notification xmlns="urn:xmpp:push2:0">
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
108 <client>https://push.example.com/adlfkjadafdasf</client>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
109 <priority>normal</priority>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
110 <encrypted xmlns="urn:xmpp:sce:rfc8291:0">
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
111 <payload>Base64 encoded ciphertext</payload>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
112 </encrypted>
5663
a1d22d6efb3d mod_push2: Need to include the public key with the JWT
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5659
diff changeset
113 <jwt key="base64 encoded raw public key">the signed JWT, if present</jwt>
5659
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
114 </notification>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
115 </message>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
116 ```
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
117
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
118 NOTE: if the stanza exceeds the maximum size of 4096 bytes (and some implementations may wish to restrict this even more) the stanza may have some elements removed, body truncated, etc before it is delivered. Servers SHOULD ensure that at least the MAM id (if there is one) is still present after any minimization.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
119
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
120 ## Discovering support
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
121
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
122 A server that supports this protocol MUST advertise the `urn:xmpp:push2:0` feature in an account's service discovery information, along with the supported match and send profiles.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
123
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
124 ```xml
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
125 <iq from='juliet@capulet.lit'
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
126 to='juliet@capulet.lit/balcony'
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
127 id='disco1'
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
128 type='result'>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
129 <query xmlns='http://jabber.org/protocol/disco#info'>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
130 <identity category='account' type='registered'/>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
131 <feature var='urn:xmpp:push2:0'/>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
132 <feature var='urn:xmpp:push2:send:'/>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
133 </query>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
134 </iq>
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
135 ```
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
136
6162
aa240145aa22 mod_push2: support for disabling push notifications
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5975
diff changeset
137 ## Client disables future pushes
aa240145aa22 mod_push2: support for disabling push notifications
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5975
diff changeset
138
aa240145aa22 mod_push2: support for disabling push notifications
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5975
diff changeset
139 ```xml
aa240145aa22 mod_push2: support for disabling push notifications
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5975
diff changeset
140 <disable xmlns='urn:xmpp:push2:0' />
aa240145aa22 mod_push2: support for disabling push notifications
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5975
diff changeset
141 ```
aa240145aa22 mod_push2: support for disabling push notifications
Stephen Paul Weber <singpolyma@singpolyma.net>
parents: 5975
diff changeset
142
5659
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
143 ## Push service interactions
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
144
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
145 ### Transient delivery errors
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
146
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
147 The user's server might receive delivery errors while sending notifications to the user's push service. The error 'type' attribute SHOULD be honoured - errors of type 'wait' SHOULD be retried in an appropriate manner (e.g. using exponential back-off algorithm, up to a limit), discarding the notification after an appropriate length of time or number of attempts.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
148
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
149 Other error types MUST NOT be automatically retried.
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
150
4d1a3de56c3d Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff changeset
151 A user's server MAY automatically disable a push configuration for a service that has consistently failed to relay notifications for an extended period of time. This period is a matter of deployment configuration, but a default no less than 72 hours is recommended.