don't double notify when mentioned in reply to your own content
This commit is contained in:
parent
4b64912333
commit
d97608a710
@ -68,9 +68,11 @@ export default {
|
|||||||
true as mention
|
true as mention
|
||||||
FROM "Mention"
|
FROM "Mention"
|
||||||
JOIN "Item" on "Mention"."itemId" = "Item".id
|
JOIN "Item" on "Mention"."itemId" = "Item".id
|
||||||
|
JOIN "Item" p on "Item"."parentId" = p.id
|
||||||
WHERE "Mention"."userId" = $1
|
WHERE "Mention"."userId" = $1
|
||||||
AND "Mention".created_at <= $2
|
AND "Mention".created_at <= $2
|
||||||
AND "Item"."userId" <> $1)
|
AND "Item"."userId" <> $1
|
||||||
|
AND p."userId" <> $1)
|
||||||
ORDER BY sort_time DESC
|
ORDER BY sort_time DESC
|
||||||
OFFSET $3
|
OFFSET $3
|
||||||
LIMIT ${LIMIT}`, me.id, decodedCursor.time, decodedCursor.offset)
|
LIMIT ${LIMIT}`, me.id, decodedCursor.time, decodedCursor.offset)
|
||||||
|
@ -47,7 +47,7 @@ export default function Notifications ({ variables, ...props }) {
|
|||||||
<small className='font-weight-bold text-info ml-2'>you were mentioned in</small>}
|
<small className='font-weight-bold text-info ml-2'>you were mentioned in</small>}
|
||||||
<div className={
|
<div className={
|
||||||
n.__typename === 'Votification' || n.__typename === 'Mention'
|
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' : ''}`
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user