Mercurial > prosody-modules
comparison mod_unified_push/README.md @ 6110:9db1529c06c2
Merge upstream
| author | tmolitor <thilo@eightysoft.de> |
|---|---|
| date | Sun, 05 Jan 2025 17:50:02 +0100 |
| parents | 04d0ab97a678 |
| children |
comparison
equal
deleted
inserted
replaced
| 6109:4cb1cad2badd | 6110:9db1529c06c2 |
|---|---|
| 1 --- | 1 --- |
| 2 labels: | 2 labels: |
| 3 - Stage-Alpha | 3 - Stage-Alpha |
| 4 summary: "Unified Push provider" | 4 summary: Unified Push provider |
| 5 --- | 5 --- |
| 6 | 6 |
| 7 This module implements a [Unified Push](https://unifiedpush.org/) Provider | 7 This module implements a [Unified Push](https://unifiedpush.org/) Provider |
| 8 that uses XMPP to talk to a Push Distributor (e.g. [Conversations](http://codeberg.org/iNPUTmice/Conversations)). | 8 that uses XMPP to talk to a Push Distributor (e.g. [Conversations](http://codeberg.org/iNPUTmice/Conversations)). |
| 9 | 9 |
| 70 | 70 |
| 71 A random push secret can be generated with the command | 71 A random push secret can be generated with the command |
| 72 `openssl rand -base64 32`. Changing the secret will invalidate all existing | 72 `openssl rand -base64 32`. Changing the secret will invalidate all existing |
| 73 push registrations. | 73 push registrations. |
| 74 | 74 |
| 75 ### HTTP configuration | 75 ## HTTP configuration |
| 76 | 76 |
| 77 This module exposes a HTTP endpoint (to receive push notifications from app | 77 This module exposes a HTTP endpoint, by default at the path `/push` (to receive push notifications from app |
| 78 servers). For more information on configuring HTTP services in Prosody, see | 78 servers). **If you use a reverse proxy, make sure you proxy this path too.** |
| 79 For more information on configuring HTTP services and reverse proxying in Prosody, see | |
| 79 [Prosody HTTP documentation](https://prosody.im/doc/http). | 80 [Prosody HTTP documentation](https://prosody.im/doc/http). |
| 80 | 81 |
| 81 #### Example configuration | 82 ## Example configuration |
| 82 | 83 |
| 83 ##### Normal method | 84 ### Recommended: load on Virtualhost(s) |
| 84 | 85 |
| 85 Just add just add `"unified_push"` to your `modules_enabled` option. | 86 Just add just add `"unified_push"` to your `modules_enabled` option. |
| 86 This is the easiest and **recommended** configuration. | 87 This is the easiest and **recommended** configuration. |
| 87 | 88 |
| 88 ``` {.lua} | 89 ``` lua |
| 89 modules_enabled = { | 90 modules_enabled = { |
| 90 --- | 91 -- ... |
| 91 "unified_push"; | 92 "unified_push"; |
| 92 --- | 93 -- ... |
| 93 } | 94 } |
| 94 ``` | 95 ``` |
| 95 | 96 |
| 96 ##### Component method | 97 #### Component method |
| 97 | 98 |
| 98 This is an example of how to configure the module as an internal component, | 99 This is an example of how to configure the module as an internal component, |
| 99 e.g. on a subdomain or other non-user domain. | 100 e.g. on a subdomain or other non-user domain. |
| 100 | 101 |
| 101 This example creates a push notification component called | 102 This example creates a push notification component called |
| 103 | 104 |
| 104 The 'http_host' line instructs Prosody to expose this module's HTTP services | 105 The 'http_host' line instructs Prosody to expose this module's HTTP services |
| 105 on the 'example.com' host, which avoids needing to create/update DNS records | 106 on the 'example.com' host, which avoids needing to create/update DNS records |
| 106 and HTTPS certificates if example.com is already set up. | 107 and HTTPS certificates if example.com is already set up. |
| 107 | 108 |
| 108 ``` {.lua} | 109 ``` lua |
| 109 Component "notify.example.com" "unified_push" | 110 Component "notify.example.com" "unified_push" |
| 110 unified_push_secret = "<secret string here>" | 111 unified_push_secret = "<secret string here>" |
| 111 http_host = "example.com" | 112 http_host = "example.com" |
| 112 ``` | 113 ``` |
| 113 | 114 |
| 114 ## Compatibility | 115 ## Compatibility |
| 115 | 116 |
| 116 | trunk | Works | | 117 Prosody-Version Status |
| 117 | 0.12 | Works | | 118 ----------------- ---------------------- |
| 119 trunk Works as of 24-12-08 | |
| 120 0.12 Works |
