webpush: don't notify author about own events

This commit is contained in:
Alex Gleason 2024-10-14 17:31:05 -05:00
parent a7d8d86fa7
commit 4c5d98f402
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -252,6 +252,10 @@ async function webPush(event: NostrEvent): Promise<void> {
.execute(); .execute();
for (const row of rows) { 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 }); const notification = await renderNotification(event, { viewerPubkey: row.pubkey });
if (!notification) { if (!notification) {
continue; continue;