HUGE hotfix - don't process todo / daily scoring if that checkbox didn't

come from the local model. This is the fix to the negative xp / gp bug!!
This commit is contained in:
Tyler Renelle 2013-08-12 20:07:33 -04:00
parent 1096ae041a
commit db57571ee6

View file

@ -101,7 +101,7 @@ module.exports.app = (appExports, model) ->
the above function doesn't work so we need a listener here
###
user.on 'set', 'tasks.*.completed', (i, completed, previous, isLocal, passed) ->
return if passed?.cron # Don't do this stuff on cron
return if !isLocal or passed?.cron # Don't do this stuff on cron
direction = if completed then 'up' else 'down'
misc.score(model, i, direction, true)