mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
PublicChatChannel.relays() was `info.relays?.toSet() ?: super.relays()`. An empty (non-null) declared-relay list — `emptyList()?.toSet()` — yields an empty set and short-circuits the elvis, so the channel reported zero relays instead of falling back to the relays it was actually observed on. Both the message-send path and the broadcast path (computeRelaysForChannels / wantsBroadcastRelays) read relays(), so the message was published to nowhere while a manual broadcast still reached the user's personal relays — matching the reported symptom. Treat an empty declared list like "no declared relays" via ifEmpty, so it falls back to observed relays. Adds PublicChatChannelRelayTest covering the declared-relay round-trip, message->channel resolution, and the empty-list fallback regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AYtHYEob2THu74inTxZxCh