Merge pull request #5631 from Ocelot-Social-Community/fix-my-groups-count

fix: My Groups Count Includes Pending Membership
This commit is contained in:
Moriz Wahl 2022-11-07 17:59:56 +01:00 committed by GitHub
commit 66748ee83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ export default {
if (isMember) {
cypher = `MATCH (user:User)-[membership:MEMBER_OF]->(group:Group)
WHERE user.id = $userId
AND membership.role IN ['usual', 'admin', 'owner']
AND membership.role IN ['usual', 'admin', 'owner', 'pending']
RETURN toString(count(group)) AS count`
} else {
cypher = `MATCH (group:Group)