Diff

plugins/mod_pep.lua @ 11566:6e67872bcba4 0.11

mod_pep: Remove obsolete node restoration code (now done by util.pubsub) Originally added in 202b9951b037 but util.pubsub gained a better method in 6c2c2fc4b8dd since then, which mod_pep uses since 9194431b6447 which should have deleted this. All these :create calls would have failed with a 'conflict' error, since the nodes had already been created. This was never noticed because of missing error handling. Also note that this code did not restore node configuration.
author Kim Alvefur <zash@zash.se>
date Sun, 16 May 2021 16:14:23 +0200
parent 11376:774811e2c6ab
child 11567:c471e19a238e
child 12085:1d213c6f781b
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Sun May 16 16:02:00 2021 +0200
+++ b/plugins/mod_pep.lua	Sun May 16 16:14:23 2021 +0200
@@ -207,18 +207,6 @@
 
 		check_node_config = check_node_config;
 	});
-	local nodes, err = known_nodes:get(username);
-	if nodes then
-		module:log("debug", "Restoring nodes for user %s", username);
-		for node in pairs(nodes) do
-			module:log("debug", "Restoring node %q", node);
-			service:create(node, true);
-		end
-	elseif err then
-		module:log("error", "Could not restore nodes for %s: %s", username, err);
-	else
-		module:log("debug", "No known nodes");
-	end
 	services[username] = service;
 	module:add_item("pep-service", { service = service, jid = user_bare });
 	return service;