Wed, 22 Dec 2010 03:46:07 +0000
util.pubsub: Small code tidying for :get_subscription()
util/pubsub.lua | file | annotate | diff | comparison | revisions |
--- a/util/pubsub.lua Wed Dec 22 03:44:51 2010 +0000 +++ b/util/pubsub.lua Wed Dec 22 03:46:07 2010 +0000 @@ -154,9 +154,10 @@ end -- local node_obj = self.nodes[node]; - if node_obj then - return true, node_obj.subscribers[jid]; + if not node_obj then + return false, "item-not-found"; end + return true, node_obj.subscribers[jid]; end function service:create(node, actor)