Fix item mention of own items (#1250)
This commit is contained in:
parent
9145f290dc
commit
2dd96f4b83
|
@ -35,7 +35,8 @@ export const getItemMentions = async ({ text }, { me, models }) => {
|
||||||
if (refs?.length > 0) {
|
if (refs?.length > 0) {
|
||||||
const referee = await models.item.findMany({
|
const referee = await models.item.findMany({
|
||||||
where: {
|
where: {
|
||||||
id: { in: refs }
|
id: { in: refs },
|
||||||
|
userId: { not: me?.id || USER_ID.anon }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return referee.map(r => ({ refereeId: r.id }))
|
return referee.map(r => ({ refereeId: r.id }))
|
||||||
|
|
Loading…
Reference in New Issue