From 2966487f647b2f3585aefbc408bcc731c71524c2 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 29 Sep 2026 21:54:04 -0400 Subject: [PATCH] fix(concord): tell a banned member why the composer is gone A ban removes the composer (canPost is false), but unlike a dissolution or a missing channel key it left the bottom of the channel silently empty. It now shows a notice that the account is banned and its messages are hidden. Co-Authored-By: Claude Opus 5.5 --- .../chats/publicChannels/concord/ConcordChannelScreen.kt | 6 ++++++ .../src/commonMain/composeResources/values/strings.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelScreen.kt index 15b74fd062..9a1a631ef6 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/publicChannels/concord/ConcordChannelScreen.kt @@ -63,11 +63,13 @@ import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols import com.vitorpamplona.amethyst.commons.model.cache.LocalCache import com.vitorpamplona.amethyst.commons.model.chats.formatHistoryReachDate import com.vitorpamplona.amethyst.commons.model.concord.ConcordCommunitySession +import com.vitorpamplona.amethyst.commons.model.concord.ConcordMembership import com.vitorpamplona.amethyst.commons.model.concordChannelLastReadRoute import com.vitorpamplona.amethyst.commons.nip30CustomEmojis.ui.ShowEmojiSuggestionList import com.vitorpamplona.amethyst.commons.relayClient.user.observeUserInfo import com.vitorpamplona.amethyst.commons.resources.Res import com.vitorpamplona.amethyst.commons.resources.back +import com.vitorpamplona.amethyst.commons.resources.concord_banned_notice import com.vitorpamplona.amethyst.commons.resources.concord_dissolved_read_only import com.vitorpamplona.amethyst.commons.resources.concord_private_channel_cut import com.vitorpamplona.amethyst.commons.resources.concord_private_channel_no_key @@ -305,6 +307,10 @@ fun ConcordChannelScreen( // CORD-02 §9: an owner-signed tombstone seals the community read-only — the composer is // gone (canPost() is false) and this replaces it so the seal is explained, not silent. ConcordDissolvedNotice() + } else if (channel.membership == ConcordMembership.BANNED) { + // CORD-04 §4: every reader drops a banned author's messages, so the composer is gone; + // say why instead of leaving the bottom of the screen silently empty. + ConcordReadOnlyNotice(Res.string.concord_banned_notice) } else if (!channel.keyHeld) { // CORD-03 §1: a Private Channel is keyed independently; without its key there is no // plane only its members can read, so nothing may be posted (never to the root plane). diff --git a/commonsUI/src/commonMain/composeResources/values/strings.xml b/commonsUI/src/commonMain/composeResources/values/strings.xml index a7b7e7212d..cbdd31b138 100644 --- a/commonsUI/src/commonMain/composeResources/values/strings.xml +++ b/commonsUI/src/commonMain/composeResources/values/strings.xml @@ -617,6 +617,7 @@ This community has been dissolved and is now read-only. You can still read its history, but no new messages can be posted. This is a private channel and you don't hold its key, so you can't read it or post here. You no longer have access to this private channel: its key was rotated without you, so you can't read new messages or post here. + You're banned from this community, so you can't post here and your messages are hidden from everyone. Pinned messages No pinned messages in this channel yet. This channel's pins are sealed under a key you don't hold, so they can't be shown here, and pinning is paused until they can be read.