From 0fbdd8b975e3f57c1359f0eaa08416da4b089f62 Mon Sep 17 00:00:00 2001 From: bonustrack Date: Sun, 30 Aug 2020 04:41:24 +0700 Subject: [PATCH] Fix message format --- server/api.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/server/api.ts b/server/api.ts index 94c19c4d..21b47648 100644 --- a/server/api.ts +++ b/server/api.ts @@ -126,12 +126,11 @@ router.post('/message', async (req, res) => { }) ); - sendMessage(` - #${msg.token}:\n - **${msg.payload.name}**\n - ${msg.payload.body}\n - \n - `); + let message = `#${msg.token}\n`; + message += `**${msg.payload.name}**\n`; + message += `${msg.payload.body}\n`; + message += ``; + sendMessage(message); } if (msg.type === 'vote') {