aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-29 17:37:27 +0200
committerKim Alvefur <zash@zash.se>2021-07-29 17:37:27 +0200
commitb2327f5d4cf4ea870c80f59e4f1c7e15c59dd021 (patch)
treef229c6fab229f2d06c17048ca7e1da6ed7873f76
parentd1fe0504e7e7e2b2242316eb5be07099351bb802 (diff)
downloadprosody-b2327f5d4cf4ea870c80f59e4f1c7e15c59dd021.tar.gz
prosody-b2327f5d4cf4ea870c80f59e4f1c7e15c59dd021.zip
mod_pubsub: Update callbacks on reload to more completely refresh config
This would also release any resources held via references from these callbacks. I'm not sure why we don't just re-new() the whole thing. Related to #1382
-rw-r--r--plugins/mod_pubsub/mod_pubsub.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/mod_pubsub.lua b/plugins/mod_pubsub/mod_pubsub.lua
index bcba88f2..09d1ab35 100644
--- a/plugins/mod_pubsub/mod_pubsub.lua
+++ b/plugins/mod_pubsub/mod_pubsub.lua
@@ -186,6 +186,14 @@ function set_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;
+
+ service.config.nodestore = node_store;
+ service.config.itemstore = create_simple_itemstore;
+ service.config.broadcaster = simple_broadcast;
+ service.config.itemcheck = is_item_stanza;
+ service.config.check_node_config = check_node_config;
+ service.config.get_affiliation = get_affiliation;
+
module.environment.service = service;
add_disco_features_from_service(service);
end