diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-12-22 03:46:07 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-12-22 03:46:07 +0000 |
commit | 4640ae8b21ac9ad741649041459648feea24b02f (patch) | |
tree | 165537677dc1dd055b54d98ede1463ff0faa33a6 | |
parent | 3c67a234e69ba696fbe9467d984c8bdf3956cf01 (diff) | |
download | prosody-4640ae8b21ac9ad741649041459648feea24b02f.tar.gz prosody-4640ae8b21ac9ad741649041459648feea24b02f.zip |
util.pubsub: Small code tidying for :get_subscription()
-rw-r--r-- | util/pubsub.lua | 5 |
1 files changed, 3 insertions, 2 deletions
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) |