From 994e27ded1533b8eb8b4cc2515920a135da7c80e Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Tue, 9 Jun 2026 10:45:50 -0700 Subject: [PATCH] Don't suggest users who can't be messaged/added (#10820) --- src/components/dms/AddMembersFlow.tsx | 7 +------ src/components/dms/InitiateChatFlow.tsx | 5 +---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/dms/AddMembersFlow.tsx b/src/components/dms/AddMembersFlow.tsx index ae2945d2ce..0c0b171e02 100644 --- a/src/components/dms/AddMembersFlow.tsx +++ b/src/components/dms/AddMembersFlow.tsx @@ -209,6 +209,7 @@ export function AddMembersFlow({ if (follows) { for (const page of follows.pages) { for (const profile of page.follows) { + if (!canBeAddedToGroup(profile)) continue _items.push({ type: 'profile', key: profile.did, @@ -216,12 +217,6 @@ export function AddMembersFlow({ }) } } - - _items.sort(item => { - return item.type === 'profile' && canBeAddedToGroup(item.profile) - ? -1 - : 1 - }) } else { for (let i = 0; i < 10; i++) { _items.push({type: 'placeholder', key: i + ''}) diff --git a/src/components/dms/InitiateChatFlow.tsx b/src/components/dms/InitiateChatFlow.tsx index ed519fed23..b42357585d 100644 --- a/src/components/dms/InitiateChatFlow.tsx +++ b/src/components/dms/InitiateChatFlow.tsx @@ -303,6 +303,7 @@ export function InitiateChatFlow({ if (follows) { for (const page of follows.pages) { for (const profile of page.follows) { + if (!checker(profile)) continue _items.push({ type: 'profile', key: profile.did, @@ -310,10 +311,6 @@ export function InitiateChatFlow({ }) } } - - _items = _items.sort(item => { - return item.type === 'profile' && checker(item.profile) ? -1 : 1 - }) } else { _items.push(...placeholders) }