diff --git a/packages/app/src/Notifications.ts b/packages/app/src/Notifications.ts index 1c1ef3f..2b4f5ab 100644 --- a/packages/app/src/Notifications.ts +++ b/packages/app/src/Notifications.ts @@ -10,6 +10,10 @@ import { MentionRegex } from "Const"; export async function makeNotification(db: UsersDb, ev: TaggedRawEvent): Promise { switch (ev.kind) { case EventKind.TextNote: { + const isRepost = ev.tags.some((a, i) => a[0] === "e" && a[3] === "mention" && ev.content === `#[${i}]`); + if (isRepost) { + return null; + } const pubkeys = new Set([ev.pubkey, ...ev.tags.filter(a => a[0] === "p").map(a => a[1])]); const users = await db.bulkGet(Array.from(pubkeys)); const fromUser = users.find(a => a?.pubkey === ev.pubkey);