Skip to content

feat(channels): a conversation the account has left says so and refuses sends - #533

Merged
setkyar merged 1 commit into
mainfrom
feat/conversation-left
Dec 3, 2026
Merged

setkyar merged 1 commit into
mainfrom
feat/conversation-left

Conversation

@setkyar

@setkyar setkyar commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

What

A channel gateway can now report that the account itself is no longer in a conversation: it left a group, was removed, or the group is gone.

  • Protocol: participant.remove with isSelf: true and the account's own endpoint. participant.upsert (participantKind: account, isSelf: true) for the same endpoint reverses it. Documented in docs/channel-gateway-protocol.md.
  • The event is ignored for a conversation the inbox does not hold, so leaving a group that was never shown does not create it.
  • API: the conversation detail carries leftConversation; a send is refused with 409 CONVERSATION_LEFT before anything is stored, and the outbound dispatcher refuses queued intents too.
  • Web: a notice replaces the composer, in all nine locales.

No schema change: it uses the existing is_self and left_at columns of conversation_participants.

Testing

Integration test added (23 pass locally with a database). API and web typecheck and lint clean.

…es sends

A channel can report that the account itself is no longer in a
conversation (participant.remove with isSelf): it left a group, was removed
or the group is gone. The conversation then shows a notice in place of the
composer, and sends are refused before anything is stored or queued. A
participant.upsert for the same endpoint opens it again. The event is
ignored for a conversation the inbox does not hold.
@setkyar
setkyar merged commit 980a4bb into main Dec 3, 2026
9 checks passed
@setkyar
setkyar deleted the feat/conversation-left branch December 3, 2026 13:07
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.

1 participant