don't double notify when mentioned in reply to your own content

This commit is contained in:
keyan 2021-08-18 18:14:18 -05:00
parent 4b64912333
commit d97608a710
2 changed files with 4 additions and 2 deletions

View File

@ -68,9 +68,11 @@ export default {
true as mention
FROM "Mention"
JOIN "Item" on "Mention"."itemId" = "Item".id
JOIN "Item" p on "Item"."parentId" = p.id
WHERE "Mention"."userId" = $1
AND "Mention".created_at <= $2
AND "Item"."userId" <> $1)
AND "Item"."userId" <> $1
AND p."userId" <> $1)
ORDER BY sort_time DESC
OFFSET $3
LIMIT ${LIMIT}`, me.id, decodedCursor.time, decodedCursor.offset)

View File

@ -47,7 +47,7 @@ export default function Notifications ({ variables, ...props }) {
<small className='font-weight-bold text-info ml-2'>you were mentioned in</small>}
<div className={
n.__typename === 'Votification' || n.__typename === 'Mention'
? `ml-sm-4 ml-2 ${n.item.title ? 'pb-2' : ''}`
? `ml-sm-4 ml-3 ${n.item.title ? 'pb-2' : ''}`
: ''
}
>