Gate group chat invites on allowGroupInvites (#10546)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-05-19 21:47:54 +03:00
committed by GitHub
parent 12ab1dd2fd
commit 09253457f9
4 changed files with 31 additions and 11 deletions
+7 -3
View File
@@ -18,7 +18,7 @@ import {type ListMethods} from '#/view/com/util/List'
import {android, atoms as a, native, useTheme, web} from '#/alf'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {canBeMessaged, type ConvoWithDetails} from '#/components/dms/util'
import {canBeAddedToGroup, type ConvoWithDetails} from '#/components/dms/util'
import * as Toggle from '#/components/forms/Toggle'
import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeftIcon} from '#/components/icons/Arrow'
import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times'
@@ -190,7 +190,9 @@ export function AddMembersFlow({
}
_items.sort(item => {
return item.type === 'profile' && canBeMessaged(item.profile) ? -1 : 1
return item.type === 'profile' && canBeAddedToGroup(item.profile)
? -1
: 1
})
}
} else {
@@ -206,7 +208,9 @@ export function AddMembersFlow({
}
_items.sort(item => {
return item.type === 'profile' && canBeMessaged(item.profile) ? -1 : 1
return item.type === 'profile' && canBeAddedToGroup(item.profile)
? -1
: 1
})
} else {
for (let i = 0; i < 10; i++) {