Diff

plugins/mod_pep.lua @ 9538:07665733b332

mod_pep: Add all pubsub service objects to item API in order to behave across reloads
author Kim Alvefur <zash@zash.se>
date Sat, 20 Oct 2018 20:23:23 +0200
parent 9205:2e710b618440
child 9540:8cdd7fec6aa7
line wrap: on
line diff
--- 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)