Software /
code /
prosody-modules
Annotate
mod_push2/push2.markdown @ 5941:5c4e102e2563 default tip
mod_pubsub_serverinfo: fix bool logic when reading config
author | Guus der Kinderen <guus.der.kinderen@gmail.com> |
---|---|
date | Mon, 03 Jun 2024 12:52:26 +0200 |
parent | 5686:a1d22d6efb3d |
rev | line source |
---|---|
5682
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"> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
18 <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
|
19 </match> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
20 </enable> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
21 ``` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
22 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
23 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
|
24 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
25 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
|
26 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
27 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
|
28 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
29 ## Match and send profiles |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
30 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
31 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
|
32 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
33 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
|
34 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
35 ### Match profiles |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
36 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
37 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
|
38 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
39 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
|
40 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
41 #### `urn:xmpp:push2:match:all` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
42 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
43 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
|
44 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
45 #### `urn:xmpp:push2:match:important` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
46 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
47 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
|
48 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
49 #### `urn:xmpp:push2:match:archived` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
50 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
51 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
|
52 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
53 #### `urn:xmpp:push2:match:archived-with-body` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
54 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
55 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
|
56 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
57 ### Send profiles |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
58 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
59 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
|
60 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
61 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
|
62 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
63 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
|
64 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
65 #### `urn:xmpp:push2:send:notify-only:0` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
66 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
67 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
|
68 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
69 Example: |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
70 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
71 ```xml |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
72 <message to="pusher@push.example.net"> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
73 <notification xmlns="urn:xmpp:push2:0"> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
74 <client>https://push.example.com/adlfkjadafdasf</client> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
75 <priority>normal</priority> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
76 </notification> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
77 </message> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
78 ``` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
79 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
80 #### `urn:xmpp:push2:send:sce+rfc8291+rfc8292:0` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
81 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
82 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
|
83 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
84 ```xml |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
85 <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
|
86 <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
|
87 <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
|
88 <jwt-alg>ES256</jwt-alg> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
89 <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
|
90 <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
|
91 </send> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
92 ``` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
93 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
94 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
|
95 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
96 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
|
97 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
98 Then a notification is sent: |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
99 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
100 ```xml |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
101 <message to="pusher@push.example.net"> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
102 <notification xmlns="urn:xmpp:push2:0"> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
103 <client>https://push.example.com/adlfkjadafdasf</client> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
104 <priority>normal</priority> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
105 <encrypted xmlns="urn:xmpp:sce:rfc8291:0"> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
106 <payload>Base64 encoded ciphertext</payload> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
107 </encrypted> |
5686
a1d22d6efb3d
mod_push2: Need to include the public key with the JWT
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
5682
diff
changeset
|
108 <jwt key="base64 encoded raw public key">the signed JWT, if present</jwt> |
5682
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
109 </notification> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
110 </message> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
111 ``` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
112 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
113 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
|
114 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
115 ## Discovering support |
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 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
|
118 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
119 ```xml |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
120 <iq from='juliet@capulet.lit' |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
121 to='juliet@capulet.lit/balcony' |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
122 id='disco1' |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
123 type='result'> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
124 <query xmlns='http://jabber.org/protocol/disco#info'> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
125 <identity category='account' type='registered'/> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
126 <feature var='urn:xmpp:push2:0'/> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
127 <feature var='urn:xmpp:push2:send:'/> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
128 </query> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
129 </iq> |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
130 ``` |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
131 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
132 ## Push service interactions |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
133 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
134 ### Transient delivery errors |
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 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
|
137 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
138 Other error types MUST NOT be automatically retried. |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
139 |
4d1a3de56c3d
Initial work on Push 2.0
Stephen Paul Weber <singpolyma@singpolyma.net>
parents:
diff
changeset
|
140 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. |