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}`);