forked from github/plane
[WEB - 508] chore: bot filter (#3751)
* dev: update bot filters * dev: remove bot filters from workspace * filter out bot members in workspace * dev: remove filtering from project member listing * dev: update filtering for bot workspace members --------- Co-authored-by: rahulramesha <rahulramesham@gmail.com>
This commit is contained in:
parent
ebad7f0cdf
commit
7927b7678d
@ -560,7 +560,6 @@ class WorkSpaceMemberViewSet(BaseViewSet):
|
||||
.get_queryset()
|
||||
.filter(
|
||||
workspace__slug=self.kwargs.get("slug"),
|
||||
member__is_bot=False,
|
||||
is_active=True,
|
||||
)
|
||||
.select_related("workspace", "workspace__owner")
|
||||
@ -768,7 +767,6 @@ class WorkspaceProjectMemberEndpoint(BaseAPIView):
|
||||
project_ids = (
|
||||
ProjectMember.objects.filter(
|
||||
member=request.user,
|
||||
member__is_bot=False,
|
||||
is_active=True,
|
||||
)
|
||||
.values_list("project_id", flat=True)
|
||||
@ -778,7 +776,6 @@ class WorkspaceProjectMemberEndpoint(BaseAPIView):
|
||||
# Get all the project members in which the user is involved
|
||||
project_members = ProjectMember.objects.filter(
|
||||
workspace__slug=slug,
|
||||
member__is_bot=False,
|
||||
project_id__in=project_ids,
|
||||
is_active=True,
|
||||
).select_related("project", "member", "workspace")
|
||||
|
@ -98,7 +98,8 @@ export class WorkspaceMemberStore implements IWorkspaceMemberStore {
|
||||
(m) => m.member !== this.userStore.currentUser?.id,
|
||||
(m) => this.memberRoot?.memberMap?.[m.member]?.display_name?.toLowerCase(),
|
||||
]);
|
||||
const memberIds = members.map((m) => m.member);
|
||||
//filter out bots
|
||||
const memberIds = members.filter((m) => !this.memberRoot?.memberMap?.[m.member]?.is_bot).map((m) => m.member);
|
||||
return memberIds;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user