Skip to content

feat(chat): adopt flipcash2 0.18.0 (cover pictures, featured groups, chatter sampling) - #983

Merged
bmc08gt merged 4 commits into
mainfrom
chore/flipcash2-0.18.0
Oct 6, 2026
Merged

bmc08gt merged 4 commits into
mainfrom
chore/flipcash2-0.18.0

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Adopts flipcash2-client-protocol 0.18.0 (flipcash2-protobuf-api #135–#138).

Pins flipcash2-client-protocol 0.18.0 in FlipcashAPI/Package.swift and Package.resolved (via Scripts/bump-contract.sh), released from code-payments/flipcash2-client-protocol#25. The pin bump is its own commit.

  • Adopts the picture → profile_picture renames in ChatService, the metadata mapping and ProfilePictureChanged. The domain Conversation.picture and .pictureChanged keep their names.
  • Adds Conversation.coverPicture and a .coverPictureChanged stream event applied in ConversationStore. The cover is stored in three new ConversationTable columns (Database.schemaVersion 47 → 48, so the store rebuilds). A write without a cover leaves the stored one in place and a write with one replaces it, matching Android's COALESCE upsert; coverPictureChanged persists the new cover. A cold start shows the stored cover before any GetChat.
  • Maps COVER_PICTURE_BLOB_NOT_ACCEPTED for StartChat and EditChat to new .coverPictureBlobNotAccepted cases. ErrorEditChat and ErrorStartChat switch on proto cases, not raw values, so the EditChatResponse.Result renumbering (DESCRIPTION_MODERATED 5 → 6) needs no positional fix; a test pins wire numbers 1–6 for EditChat and 7 for StartChat. Events.chatResult gains a CoverPictureBlobNotAccepted value.
  • Handles RosterUpdate.membershipChanged: the store applies the summary by version and keeps the cached member list.
  • Adds FlipClient.sampleChatters, setFeaturedGroups and getFeaturedGroups with domain and error types. No UI yet.

GetRoster is members-only now, but nothing in the app calls getRoster outside its wrapper.

…ured-group contract

Rename picture to profile_picture across Metadata, StartChat and EditChat.
Carry cover_picture into Conversation, applied by MetadataUpdate.CoverPictureChanged
and kept when a feed result omits it. Handle RosterUpdate.MembershipChanged by
applying the roster summary and keeping the cached member list. Map
COVER_PICTURE_BLOB_NOT_ACCEPTED in ErrorStartChat and ErrorEditChat by case name,
so the EditChat renumbering is covered. Add SampleChatters, SetFeaturedGroups and
GetFeaturedGroups wrappers with domain and error types.
Store the cover in three conversation columns beside the profile picture and bump
Database.schemaVersion to 48 (the store is rebuilt, no migration). A write whose
conversation carries no cover leaves the stored one in place, matching Android's
COALESCE upsert; coverPictureChanged now persists the store's new cover.
@bmc08gt
bmc08gt marked this pull request as ready for review October 6, 2026 17:22
@bmc08gt
bmc08gt merged commit 721fb44 into main Oct 6, 2026
2 of 3 checks passed
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