Mercurial > prosody-hg
comparison plugins/mod_pubsub/mod_pubsub.lua @ 11726:76156c675456
mod_pubsub: Update configuration on reload (fixes #1382)
Because of the way the previous pubsub service is carried access module
reloads, it would retain the configuration options with their previous
values from when the service was first created.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 25 Jul 2021 18:58:25 +0200 |
| parents | 789da12cf232 |
| children | 5735f931f5c4 |
comparison
equal
deleted
inserted
replaced
| 11725:789da12cf232 | 11726:76156c675456 |
|---|---|
| 181 return service; | 181 return service; |
| 182 end | 182 end |
| 183 | 183 |
| 184 function set_service(new_service) | 184 function set_service(new_service) |
| 185 service = new_service; | 185 service = new_service; |
| 186 service.config.autocreate_on_publish = autocreate_on_publish; | |
| 187 service.config.autocreate_on_subscribe = autocreate_on_subscribe; | |
| 188 service.config.expose_publisher = expose_publisher; | |
| 186 module.environment.service = service; | 189 module.environment.service = service; |
| 187 add_disco_features_from_service(service); | 190 add_disco_features_from_service(service); |
| 188 end | 191 end |
| 189 | 192 |
| 190 function module.save() | 193 function module.save() |
