Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

DataHandler: fix get_node_posts/subscribers/affiliations callback par…

…ameters (err, results, done)
  • Loading branch information...
commit 2f0ca4c776ac3c9d9e2b828c17a4b01e76f3c454 1 parent cf79f80
@astro astro authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/handlers/data.coffee
View
8 src/handlers/data.coffee
@@ -72,7 +72,7 @@ class exports.DataHandler extends Backbone.EventHandler
@get_subscriptions_queue.add node, callback
get_all_node_subscriptions: (nodeid, callback) =>
- @get_node_subscriptions nodeid, (err, done) =>
+ @get_node_subscriptions nodeid, (err, results, done) =>
if err or done
callback?()
else
@@ -86,7 +86,7 @@ class exports.DataHandler extends Backbone.EventHandler
@get_affiliations_queue.add node, callback
get_all_node_affiliations: (nodeid, callback) =>
- @get_node_affiliations nodeid, (err, done) =>
+ @get_node_affiliations nodeid, (err, results, done) =>
if err or done
callback?()
else
@@ -188,8 +188,8 @@ class exports.DataHandler extends Backbone.EventHandler
callback?(null, true)
get_all_user_subscriptions: (jid, callback) =>
- @get_all_user_subscriptions jid, (err, done) =>
- unless err or done
+ @get_user_subscriptions jid, (err, results, done) =>
+ unless err or (not results?.length > 0) or done
@get_all_user_subscriptions jid, callback
# event callbacks
Please sign in to comment.
Something went wrong with that request. Please try again.