From 182c7b98873d530f15e0a5c58289e5e69472c685 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Sat, 25 Apr 2015 12:56:35 +0200 Subject: [PATCH] fix bug in memoria --- scripts/memoria.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/memoria.coffee b/scripts/memoria.coffee index 891db90..5d831b3 100644 --- a/scripts/memoria.coffee +++ b/scripts/memoria.coffee @@ -71,7 +71,9 @@ module.exports = (robot) -> else # chiesto qualcosa che non è una data mem = robot.brain.get('memoria') or {} - verbo = if query? then 'è' else 'sono' + verbo = if query is 'è' or query is 'sono' then query + if query is 'cos' or query is 'quand' then verbo = 'è' + if query is 'qual' then verbo = 'è' else if !query? then verbo = 'sono' if mem[arg] # controllo se è salvata una data nell'argomento chiesto data = moment(mem[arg],'[il] YYYY-MM-DD')