diff --git a/daemon/sse/api.ts b/daemon/sse/api.ts index fb48e1bd..d6d9f88d 100644 --- a/daemon/sse/api.ts +++ b/daemon/sse/api.ts @@ -39,7 +39,17 @@ export const createSSE = () => { }, pull(controller) { startMeta(since) - .then((meta) => meta && enqueue(controller, meta)) + .then((meta) => { + if (meta) { + console.log("enqueueing meta"); + controller.enqueue({ + data: encodeURIComponent(JSON.stringify(meta)), + event: "message", + }); + } else { + console.log("not enqueing meta"); + } + }) .catch(console.error); const handler = (e: CustomEvent) =>