Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions apiserver/plane/app/views/search/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,7 @@ def get(self, request, slug, project_id):
q |= Q(**{f"{field}__icontains": query})
users = (
ProjectMember.objects.filter(
q,
member=self.request.user,
is_active=True,
project_id=project_id,
workspace__slug=slug,
q, is_active=True, project_id=project_id, workspace__slug=slug
)
.annotate(
member__avatar_url=Case(
Expand Down
7 changes: 1 addition & 6 deletions space/core/components/editor/embeds/mentions/user.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { observer } from "mobx-react";
import Link from "next/link";
import { useParams } from "next/navigation";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
Expand All @@ -12,14 +10,11 @@ type Props = {

export const EditorUserMention: React.FC<Props> = observer((props) => {
const { id } = props;
// params
const { workspaceSlug } = useParams();
// store hooks
const { data: currentUser } = useUser();
const { getMemberById } = useMember();
// derived values
const userDetails = getMemberById(id);
const profileLink = `/${workspaceSlug}/profile/${id}`;

if (!userDetails) {
return (
Expand All @@ -35,7 +30,7 @@ export const EditorUserMention: React.FC<Props> = observer((props) => {
"bg-custom-primary-100/20 text-custom-primary-100": id === currentUser?.id,
})}
>
<Link href={profileLink}>@{userDetails?.member__display_name}</Link>
@{userDetails?.member__display_name}
</div>
);
});
Loading