From 74b6d5e9e8aedb1bf8ca9c35bbce0c99ca6801cb Mon Sep 17 00:00:00 2001 From: Anirban Singha Date: Wed, 15 Jan 2025 21:22:11 +0530 Subject: [PATCH] feat: Add numbered list for /whiteboard list command --- whiteboard/lib/messages.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/whiteboard/lib/messages.ts b/whiteboard/lib/messages.ts index 11d9939318..9947b28a5a 100644 --- a/whiteboard/lib/messages.ts +++ b/whiteboard/lib/messages.ts @@ -221,9 +221,11 @@ export async function handleListCommand( ); } - const text = `*All existing boards are*: - ${boardDataArray.join("\n")} - `; + const numberedBoards = boardDataArray.map((title: string, index: number) => { + return `${index + 1}. ${title}` + }) + + const text = `*All existing boards are*:\n${numberedBoards.join("\n")}`; return await sendNotification(read, modify, user, room, text); }