only poll dropbox users who have the dropbox feature

This commit is contained in:
Henry Oswald 2014-04-05 12:14:50 +01:00
parent 33b6626fd9
commit b36ced3058

View file

@ -23,7 +23,7 @@ self = module.exports =
callback()
_getUserIdsWithDropbox: (callback)->
User.find {"dropbox.access_token.oauth_token_secret":{"$exists":true}}, "_id", (err, users)->
User.find {"dropbox.access_token.oauth_token_secret":{"$exists":true}, "features.dropbox":true}, "_id", (err, users)->
ids = users.map (user)->
return user._id+""
callback err, ids