mod_pep: Add all pubsub service objects to item API in order to behave across reloads
authorKim Alvefur <zash@zash.se>
Sat, 20 Oct 2018 20:23:23 +0200
changeset 9541 07665733b332
parent 9540 5fe1b08e6353
child 9542 b30455212f89
mod_pep: Add all pubsub service objects to item API in order to behave across reloads
plugins/mod_pep.lua
--- a/plugins/mod_pep.lua	Sun Oct 21 21:12:38 2018 +0200
+++ b/plugins/mod_pep.lua	Sat Oct 20 20:23:23 2018 +0200
@@ -43,6 +43,10 @@
 function module.restore(data)
 	services = data.services;
 	recipients = data.recipients;
+	for username, service in pairs(services) do
+		local user_bare = jid_join(username, host);
+		module:add_item("pep-service", { service = service, jid = user_bare });
+	end
 end
 
 function is_item_stanza(item)