diff --git a/src/core/handlers.c b/src/core/handlers.c index a34c430..d08401c 100644 --- a/src/core/handlers.c +++ b/src/core/handlers.c @@ -91,14 +91,14 @@ g_string_append(reminder->from, from); if(reminder->minutes > 0) { if(bot_start_task(reminder) != 0) { - g_string_printf(replytext, "Mi dispiace %s ma non posso mandarti un messaggio tra %d minuti, qualcosa non va.\n", reminder->from->str, reminder->minutes); + g_string_printf(replytext, "Mi dispiace %s ma non posso mandarti un messaggio tra %d minuti, qualcosa non va.\n", strtok(strdup(reminder->from->str), "@"), reminder->minutes); } else { - g_string_printf(replytext, "Va bene %s, ti mando un messaggio tra %d minuti.\n", reminder->from->str, reminder->minutes); + g_string_printf(replytext, "Va bene %s, ti mando un messaggio tra %d minuti.\n", strtok(strdup(reminder->from->str), "@"), reminder->minutes); } } else { /* cancel reminder */ bot_cancel_task(from); - g_string_printf(replytext, "Ho cancellato il reminder, %s.\n", reminder->from->str); + g_string_printf(replytext, "Ho cancellato il reminder, %s.\n", strtok(strdup(reminder->from->str), "@")); } break; default: