projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util.ip: Fix protocol detection of IPv6 addresses beginning with : [Backported from...
[prosody.git]
/
util
/
pubsub.lua
diff --git
a/util/pubsub.lua
b/util/pubsub.lua
index e7fc86b10c23d706b1c6792bcb22eabd74ab3032..e1418c62d51fdccf96b4f8605789ce0378e11a9e 100644
(file)
--- a/
util/pubsub.lua
+++ b/
util/pubsub.lua
@@
-233,6
+233,9
@@
function service:delete(node, actor)
end
--
local node_obj = self.nodes[node];
end
--
local node_obj = self.nodes[node];
+ if not node_obj then
+ return false, "item-not-found";
+ end
self.nodes[node] = nil;
self.config.broadcaster("delete", node, node_obj.subscribers);
return true;
self.nodes[node] = nil;
self.config.broadcaster("delete", node, node_obj.subscribers);
return true;
@@
-350,7
+353,7
@@
function service:get_subscriptions(node, actor, jid)
if node then -- Return only subscriptions to this node
if subscribed_nodes[node] then
ret[#ret+1] = {
if node then -- Return only subscriptions to this node
if subscribed_nodes[node] then
ret[#ret+1] = {
- node =
subscribed_nodes[node]
;
+ node =
node
;
jid = jid;
subscription = node_obj.subscribers[jid];
};
jid = jid;
subscription = node_obj.subscribers[jid];
};