Changeset

11567:c471e19a238e

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 16 May 2021 19:05:20 +0200
parents 11564:60e31c9ece57 (current diff) 11566:6e67872bcba4 (diff)
children 11568:d5360307a99d
files plugins/mod_pep.lua util/pubsub.lua
diffstat 2 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pep.lua	Sun May 16 16:52:59 2021 +0200
+++ b/plugins/mod_pep.lua	Sun May 16 19:05:20 2021 +0200
@@ -214,18 +214,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;
--- a/util/pubsub.lua	Sun May 16 16:52:59 2021 +0200
+++ b/util/pubsub.lua	Sun May 16 19:05:20 2021 +0200
@@ -565,6 +565,10 @@
 		return nil, "invalid-item";
 	end
 	local node_data = self.data[node];
+	if not node_data then
+		-- FIXME how is this possible?  #1657
+		return nil, "internal-server-error";
+	end
 	local ok = node_data:set(id, item);
 	if not ok then
 		return nil, "internal-server-error";