Mercurial > prosody-modules
comparison mod_cloud_notify/README.markdown @ 2976:df86ce6bb0b4
Implement dummy body message to indicate high priority push
This adds a dummy body sent alongside the push when the original message
also contained a body to indicate a high priority push.
The body can be configured and its contents are generally meaningless
with most app servers because it will be stripped before pushed to the client.
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Sun, 01 Apr 2018 23:24:33 +0200 |
parents | 4d81d7219db0 |
children | 6abee021d9db |
comparison
equal
deleted
inserted
replaced
2975:7eb6fa9b03fd | 2976:df86ce6bb0b4 |
---|---|
19 App servers are notified about offline messages, messages stored by [mod_mam] | 19 App servers are notified about offline messages, messages stored by [mod_mam] |
20 or messages waiting in the smacks queue. | 20 or messages waiting in the smacks queue. |
21 The business rules outlined [here] are all honored[^2]. | 21 The business rules outlined [here] are all honored[^2]. |
22 | 22 |
23 To cooperate with [mod_smacks] this module consumes some events: | 23 To cooperate with [mod_smacks] this module consumes some events: |
24 "smacks-ack-delayed", "smacks-hibernation-start" and "smacks-hibernation-end". | 24 `smacks-ack-delayed`, `smacks-hibernation-start` and `smacks-hibernation-end`. |
25 These events allow this module to send out notifications for messages received | 25 These events allow this module to send out notifications for messages received |
26 while the session is hibernated by [mod_smacks] or even when smacks | 26 while the session is hibernated by [mod_smacks] or even when smacks |
27 acknowledgements for messages are delayed by a certain amount of seconds | 27 acknowledgements for messages are delayed by a certain amount of seconds |
28 configurable with the [mod_smacks] setting "smacks_max_ack_delay". | 28 configurable with the [mod_smacks] setting `smacks_max_ack_delay`. |
29 | 29 |
30 The "smacks_max_ack_delay" setting allows to send out notifications to clients | 30 The `smacks_max_ack_delay` setting allows to send out notifications to clients |
31 which aren't already in smacks hibernation state (because the read timeout or | 31 which aren't already in smacks hibernation state (because the read timeout or |
32 connection close didn't happen already) but also aren't responding to acknowledgement | 32 connection close didn't already happen) but also aren't responding to acknowledgement |
33 request in a timely manner, thus allowing conversations to be smoother under such | 33 request in a timely manner. This setting thus allows conversations to be smoother |
34 circumstances. | 34 under such circumstances. |
35 | 35 |
36 The new event "cloud-notify-ping" can be used by any module to send out a cloud | 36 The new event `cloud-notify-ping` can be used by any module to send out a cloud |
37 notification to either all registered endpoints for the given user or only the endpoints | 37 notification to either all registered endpoints for the given user or only the endpoints |
38 given in the event data. | 38 given in the event data. |
39 | |
40 The config setting `push_notification_important_body` can be used to specify an alternative | |
41 body text to send to the remote pubsub node if the stanza is encrypted or has a body. | |
42 This way the real contents of the message aren't revealed to the push appserver but it | |
43 can still see that the push is important. | |
44 This is used by Chatsecure on iOS to send out high priority pushes in those cases for example. | |
39 | 45 |
40 Configuration | 46 Configuration |
41 ============= | 47 ============= |
42 | 48 |
43 Option Default Description | 49 Option Default Description |
44 --------------------------------- --------- ------------------------------------------------------------------ | 50 ------------------------------------ --------- --------------------------------------------------------------------------------------------------------------- |
45 `push_notification_with_body` `false` Whether or not to send the message body to remote pubsub node. | 51 `push_notification_with_body` `false` Whether or not to send the message body to remote pubsub node. |
46 `push_notification_with_sender` `false` Whether or not to send the message sender to remote pubsub node. | 52 `push_notification_with_sender` `false` Whether or not to send the message sender to remote pubsub node. |
53 `push_max_errors` `50` How much persistent push errors are tolerated before notifications for the identifier in question are disabled | |
54 `push_notification_important_body` `` The body text to use when the stanza is important (see above), no message body is sent if this is empty | |
47 | 55 |
48 There are privacy implications for enabling these options because | 56 There are privacy implications for enabling these options because |
49 plaintext content and metadata will be shared with centralized servers | 57 plaintext content and metadata will be shared with centralized servers |
50 (the pubsub node) run by arbitrary app developers. | 58 (the pubsub node) run by arbitrary app developers. |
51 | 59 |