# HG changeset patch # User Matthew Wild # Date 1292989567 0 # Node ID 843ee23cc91a6aacc774bd0b6b61276b1d796c3d # Parent 61f12f8a85392e93018b7b3171dfc342b3811957 util.pubsub: Small code tidying for :get_subscription() diff -r 61f12f8a8539 -r 843ee23cc91a util/pubsub.lua --- 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)