Skip to content

feat(chat): scaffold flipcash2 0.22.0 group invites - #1863

Merged
bmc08gt merged 2 commits into
code/cashfrom
feat/flipcash2-group-invites
Oct 27, 2026
Merged

bmc08gt merged 2 commits into
code/cashfrom
feat/flipcash2-group-invites

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Adapts the app to the flipcash2 0.22.0 contract (group invites), from code-payments/flipcash2-client-protocol#30. It adds no UI and no invite crypto.

Pins flipcash2-client-protocol 0.22.0 in libs.versions.toml, in the last commit.

  • Invite RPCs: CreateInvite, GetInvite, GetChatInvites and RevokeInvite go through ChatApi → ChatService → ChatRepository → ChatController. Domain models are in models/chat/Invite.kt; InviteToken.toString() is redacted.
  • JoinChat: takes optional InviteParameters. JoinChatError gains InviteNotFound, InviteExhausted, InviteExpired and InviteRevoked.
  • GetRoster: takes an optional invite token, and owner is now nullable. The API layer requires one of the two.
  • GetKeyEnvelope: branches on envelopeCase. An invite_key_bundle fails with GetKeyEnvelopeError.InviteKeyBundleOnly(bundle) instead of decoding as an empty KeyEnvelope. StoredKeyEnvelope also carries wrappedByPublicKey.
  • ViewerState.Permissions.canInvite: mapped, but not persisted to Room. canSilence and canBan aren't either.
  • SystemEvent.UserJoined: gains invitedBy, persisted through MessageContentSerialized. Old rows decode with null. The message still renders as a plain join.

The username limit stays at 15. The contract now allows 30, but the handle regex, @mention detection and the deeplink path filters in AndroidManifest.xml all assume 15, so that needs its own change.

Wrap CreateInvite, GetInvite, GetChatInvites and RevokeInvite through
api, service, repository and controller. JoinChat takes optional invite
parameters and maps INVITE_NOT_FOUND/EXHAUSTED/EXPIRED/REVOKED. GetRoster
accepts an invite token with the owner optional.

GetKeyEnvelope now branches on envelopeCase: an invite key bundle fails
with GetKeyEnvelopeError.InviteKeyBundleOnly instead of reading a default
KeyEnvelope, and wrapped_by_public_key is carried on StoredKeyEnvelope.

Adds Invite domain models, ViewerState.Permissions.canInvite, and the
invited join system event (persisted alongside admittedBy). Invite crypto
and UI are not included.
@bmc08gt
bmc08gt marked this pull request as ready for review October 27, 2026 19:58
@github-actions github-actions Bot added the area: build-system Gradle, convention plugins, build-logic label Oct 27, 2026
@bmc08gt
bmc08gt merged commit e497c58 into code/cash Oct 27, 2026
6 checks passed
@bmc08gt
bmc08gt deleted the feat/flipcash2-group-invites branch October 27, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: network gRPC, connectivity, API, exchange rates type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant