forked from FoundKeyGang/FoundKey
fixup: actually check whether the group joining is from the user
This commit is contained in:
parent
83373e0c51
commit
3d2cfc075a
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ export const UserRepository = db.getRepository(User).extend({
|
|||
JOIN "user_group_joining"
|
||||
ON "messaging_message"."groupId" = "user_group_joining"."userGroupId"
|
||||
WHERE
|
||||
"user_group_joining"."userId" = $1
|
||||
AND
|
||||
"messaging_message"."userId" != $1
|
||||
AND
|
||||
NOT $1 = ANY("messaging_message"."reads")
|
||||
|
|
Loading…
Reference in a new issue