From 4c5d98f402e8746e03bddc5610ccf46d934ae414 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 14 Oct 2024 17:31:05 -0500 Subject: [PATCH] webpush: don't notify author about own events --- src/pipeline.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pipeline.ts b/src/pipeline.ts index 5549193c..e5f6a216 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -252,6 +252,10 @@ async function webPush(event: NostrEvent): Promise { .execute(); for (const row of rows) { + if (row.pubkey === event.pubkey) { + continue; // Don't notify authors about their own events. + } + const notification = await renderNotification(event, { viewerPubkey: row.pubkey }); if (!notification) { continue;