add back in model.id(), modified lefnire/racer#habitrpg model.id() instead

This commit is contained in:
Tyler Renelle 2013-05-05 23:04:09 +01:00
parent b4b0733e21
commit b0b90f686c
2 changed files with 2 additions and 3 deletions

View file

@ -166,7 +166,7 @@ module.exports.app = (appExports, model, app) ->
# Check for non-whitespace characters
return unless /\S/.test text
chat.unshift
id: helpers.uuid() #FIXME model.id() isn't working, temporary solution https://github.com/lefnire/habitrpg/issues/891#issuecomment-17458776
id: model.id()
uuid: user.get('id')
contributor: user.get('backer.contributor')
npc: user.get('backer.npc')

View file

@ -14,8 +14,7 @@ module.exports.app = (appExports, model) ->
# Don't add a blank task; 20/02/13 Added a check for undefined value, more at issue #463 -lancemanfv
return if /^(\s)*$/.test(text) || text == undefined
#FIXME model.id() isn't working, temporary solution https://github.com/lefnire/habitrpg/issues/891#issuecomment-17458776
newTask = {id: helpers.uuid(), type: type, text: text, notes: '', value: 0}
newTask = {id: model.id(), type: type, text: text, notes: '', value: 0}
switch type
when 'habit'
newTask = _.defaults {up: true, down: true}, newTask