Skip to content

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

Merged
mozzius merged 2 commits into
mainfrom
samuel/app-2359
Jun 10, 2026
Merged

mozzius merged 2 commits into
mainfrom
samuel/app-2359

Conversation

@mozzius

@mozzius mozzius commented Jun 10, 2026

Copy link
Copy Markdown
Member

Closes APP-2359

Some moderation actions (account inactivation, convo takedown) force a group convo into the locked state. @atproto/api 0.20.12 exposes this as lockStatusModerationOverride on GroupConvo, plus a typed ConvoLockedByModerationError on unlockConvo. When the override is set, the owner shouldn't be able to unlock the chat.

UI

  • ChatLocked footer: when the lock is moderation-forced, the subheading becomes "This group is locked by a moderation action on the owner" and the "Unlock chat" button is hidden for the owner.
  • Conversation settings: the Lock/Locked button is hidden via the same gate that already handles locked-permanently.
  • Both unlock paths show a specific toast on ConvoLockedByModerationError as a fallback for stale client state.
  • ChatFooter: the new subheading is much longer than "No one can send messages", so the text column now flexes and the subheading wraps to two lines instead of truncating.

State sync

  • updateLockStatus on the convo agent now carries the override flag, and the ConvoProvider cache subscriber triggers on override changes, not just lock status changes.
  • The firehose logLockConvo event doesn't say whether the lock is moderation-forced, so the single-convo query is invalidated to refetch the flag (mirroring member-add events). On logUnlockConvo the flag is cleared directly, since an unlocked convo can't be moderation-locked.

Known gap: if a moderation lock lands while the owner has the convo open, they briefly see the regular locked footer (with unlock button) until the refetch resolves – the log event itself doesn't carry the flag. Tapping unlock in that window hits the typed error toast.

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jun 10, 2026

Copy link
Copy Markdown

APP-2359

@github-actions

github-actions Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor
Old size New size Diff
7.75 MB 7.75 MB 1.18 KB (0.01%)

@mozzius mozzius changed the title Handle moderation lock override in group chats [Chat] Handle moderation lock override in group chats Jun 10, 2026
mozzius and others added 2 commits June 10, 2026 21:51
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@arcalinea
arcalinea temporarily deployed to samuel/app-2359 - social-app PR #10835 June 10, 2026 18:51 — with Render Destroyed
@mozzius
mozzius marked this pull request as ready for review June 10, 2026 18:51
@mozzius
mozzius requested review from ds-boyce and estrattonbailey and removed request for estrattonbailey June 10, 2026 18:52
@mozzius
mozzius merged commit 8db30c7 into main Jun 10, 2026
20 checks passed

This branch was successfully deployed

No deployments
samuel/app-2359 - social-app PR #10835 — 0c3def20 Deployed Jun 10, 2026 by arcalinea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants