From b0b90f686cc5ed3b1c39b0233ad9f2e3943f896b Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 5 May 2013 23:04:09 +0100 Subject: [PATCH] add back in model.id(), modified lefnire/racer#habitrpg model.id() instead --- src/app/party.coffee | 2 +- src/app/tasks.coffee | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/party.coffee b/src/app/party.coffee index 6f2590174d..74fdff6b86 100644 --- a/src/app/party.coffee +++ b/src/app/party.coffee @@ -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') diff --git a/src/app/tasks.coffee b/src/app/tasks.coffee index ea49741292..ef6179b6c9 100644 --- a/src/app/tasks.coffee +++ b/src/app/tasks.coffee @@ -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