Don't create mentions when mentioning yourself
By extension, also don't send yourself a push notification when mentioning yourself
This commit is contained in:
parent
8ace053be5
commit
0b8316d08c
|
@ -971,7 +971,9 @@ export const createMentions = async (item, models) => {
|
|||
if (mentions?.length > 0) {
|
||||
const users = await models.user.findMany({
|
||||
where: {
|
||||
name: { in: mentions }
|
||||
name: { in: mentions },
|
||||
// Don't create mentions when mentioning yourself
|
||||
id: { not: item.userId }
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue