From d71811068e2b6583f0dd8f4739e3b3f1c17f8833 Mon Sep 17 00:00:00 2001 From: Kegan Myers Date: Fri, 16 Jun 2023 09:16:19 -0500 Subject: [PATCH] fix #7 --- announcer/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/announcer/index.js b/announcer/index.js index ce94c99..9ae123a 100644 --- a/announcer/index.js +++ b/announcer/index.js @@ -98,7 +98,9 @@ const announce = (containerId, announcements) => { }; const retract = (containerId) => { - for (const announcement of JSON.parse(cache.get(containerId) || '[]')) { + for (const { type, ...announcement } of JSON.parse( + cache.get(containerId) || '[]' + )) { const astr = JSON.stringify({ type: `${type}/retract`, ...announcement }); ws.send(astr); console.log(`${containerId.slice(0, 8)} retract: ${astr}`);