From: Matthew Wild Date: Wed, 22 Dec 2010 03:46:07 +0000 (+0000) Subject: util.pubsub: Small code tidying for :get_subscription() X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=3f36fce299ad84b98e8db5a223d90649e958417d;p=prosody.git util.pubsub: Small code tidying for :get_subscription() --- diff --git a/util/pubsub.lua b/util/pubsub.lua index bba0ed3a..f7c6597f 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -154,9 +154,10 @@ function service:get_subscription(node, actor, jid) 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)