Merge pull request #554 from SatsAllDay/537-self-mention

Self mentions
This commit is contained in:
Keyan 2023-10-12 13:26:14 -05:00 committed by GitHub
commit 676d30f9bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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 }
}
})