mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(websub): wire real-time push notifications on email ingest
Pass ExecutionContext through the email processing chain so notifySubscribers is called via ctx.waitUntil after a new email is stored. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import { processEmail, RawAttachment } from "./email-processor";
|
||||
export async function handleCloudflareEmail(
|
||||
message: ForwardableEmailMessage,
|
||||
env: Env,
|
||||
_ctx: ExecutionContext,
|
||||
ctx: ExecutionContext,
|
||||
): Promise<void> {
|
||||
try {
|
||||
const email = await PostalMime.parse(message.raw);
|
||||
@@ -41,6 +41,7 @@ export async function handleCloudflareEmail(
|
||||
attachments: rawAttachments,
|
||||
},
|
||||
env,
|
||||
ctx,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Error processing Cloudflare email:", error);
|
||||
|
||||
Reference in New Issue
Block a user