mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 05:37:39 +03:00
Merge 0.11->trunk
This commit is contained in:
commit
f650ac5537
2 changed files with 4 additions and 12 deletions
|
@ -214,18 +214,6 @@ function get_pep_service(username)
|
|||
|
||||
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;
|
||||
|
|
|
@ -565,6 +565,10 @@ function service:publish(node, actor, id, item, requested_config) --> ok, err
|
|||
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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue