[Chat] Moderation stuff (#10610)

This commit is contained in:
Samuel Newman
2026-05-26 19:55:22 +03:00
committed by GitHub
parent 3f4cd1c683
commit 308b2e05f1
11 changed files with 90 additions and 15 deletions
@@ -22,10 +22,12 @@ export function MessagesListBlockedFooter({
recipient: initialRecipient,
convoId,
moderation,
isGroup,
}: {
recipient: bsky.profile.AnyProfileView
convoId: string
moderation: ModerationDecision
isGroup: boolean
}) {
const t = useTheme()
const {t: l} = useLingui()
@@ -64,9 +66,7 @@ export function MessagesListBlockedFooter({
a.justify_center,
a.p_lg,
t.atoms.bg_contrast_50,
{
borderRadius: 40,
},
{borderRadius: 40},
]}>
<PersonXIcon fill={t.atoms.text.color} size="lg" style={[a.mb_xs]} />
<Text
@@ -77,9 +77,11 @@ export function MessagesListBlockedFooter({
a.font_semi_bold,
t.atoms.text,
]}>
{isBlocking
? l`You are blocking this person`
: l`This person is blocking you`}
{isGroup
? l`You are blocking the chat owner`
: isBlocking
? l`You are blocking this person`
: l`This person is blocking you`}
</Text>
<Text
style={[
+8 -2
View File
@@ -46,7 +46,7 @@ export function MessagesListHeader({convo}: {convo?: ConvoWithDetails | null}) {
convo.kind === 'direct' ? (
<ProfileHeaderReady convo={convo} moderationOpts={moderationOpts} />
) : (
<GroupHeaderReady convo={convo} />
<GroupHeaderReady convo={convo} moderationOpts={moderationOpts} />
)
) : (
<>
@@ -152,8 +152,10 @@ function ProfileHeaderReady({
function GroupHeaderReady({
convo,
moderationOpts,
}: {
convo: Extract<ConvoWithDetails, {kind: 'group'}>
moderationOpts: ModerationOpts
}) {
const {t: l} = useLingui()
@@ -176,7 +178,11 @@ function GroupHeaderReady({
},
}
}>
<AvatarBubbles size={40} profiles={convo.members} />
<AvatarBubbles
size={40}
profiles={convo.members}
moderationOpts={moderationOpts}
/>
<View style={[a.flex_row, a.flex_1, a.align_center]}>
<Text
style={[a.text_md, a.font_semi_bold, a.flex_shrink]}