mod_pubsub: Update configuration on reload (fixes #1382)
authorKim Alvefur <zash@zash.se>
Sun, 25 Jul 2021 18:58:25 +0200
changeset 11730 76156c675456
parent 11729 789da12cf232
child 11731 f3aee8a825cc
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.
plugins/mod_pubsub/mod_pubsub.lua
--- a/plugins/mod_pubsub/mod_pubsub.lua	Sun Jul 25 16:33:19 2021 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Sun Jul 25 18:58:25 2021 +0200
@@ -183,6 +183,9 @@
 
 function set_service(new_service)
 	service = new_service;
+	service.config.autocreate_on_publish = autocreate_on_publish;
+	service.config.autocreate_on_subscribe = autocreate_on_subscribe;
+	service.config.expose_publisher = expose_publisher;
 	module.environment.service = service;
 	add_disco_features_from_service(service);
 end