[Chat] Handle moderation lock override in group chats (#10835)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-06-10 21:57:12 +03:00
committed by GitHub
parent 3b5ede37f7
commit 8db30c7d31
8 changed files with 62 additions and 16 deletions
@@ -532,12 +532,22 @@ export function ListConvosProviderInner({
}
return {...convo, rev: log.rev}
})
// The log event doesn't say whether the lock is forced by a
// moderation override, so refetch to pick up the flag.
void queryClient.invalidateQueries({
queryKey: CONVO_KEY(log.convoId),
})
} else if (ChatBskyConvoDefs.isLogUnlockConvo(log)) {
mutateConvoView(log.convoId, convo => {
if (ChatBskyConvoDefs.isGroupConvo(convo.kind)) {
return {
...convo,
kind: {...convo.kind, lockStatus: 'unlocked'},
kind: {
...convo.kind,
lockStatus: 'unlocked',
// An unlocked convo cannot be moderation-locked.
lockStatusModerationOverride: false,
},
rev: log.rev,
}
}