Skip to content

feat(chat): encode, model and store photo messages - #961

Merged
bmc08gt merged 2 commits into
mainfrom
feat/chat-media-core
Oct 5, 2026
Merged

bmc08gt merged 2 commits into
mainfrom
feat/chat-media-core

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

First of four stacked PRs for chat photos. This one has no UI: it encodes photos, asks for an upload policy, and models and stores photo messages.

  • Photos are downscaled and JPEG-encoded down a quality ladder until they fit the upload policy's size cap. GetUploadPolicy is called with a chatMessage access context.
  • The chat_media.json vectors are synced into FlipcashCoreVectors and gated in CI, so Android can check its encoder against the same cases.
  • Content.media and a media quote kind are modelled and stored locally, and Database.schemaVersion is bumped.

Stack: this → #962 → #963 → #964.

Adds the chat-media downscale target, the JPEG quality ladder that walks
down until a photo fits the policy's size cap, and the mime selection
that follows the policy's own order. GetUploadPolicy is wrapped with a
chatMessage access context. The shared chat_media.json vectors are
synced and gated in CI.
Adds Content.media with MediaAttachment and a media quote kind, and
stores media messages locally. Database.schemaVersion is bumped because
the store now writes media content.
@bmc08gt
bmc08gt force-pushed the feat/chat-media-core branch from 8e52ba9 to 5716bbd Compare October 5, 2026 22:23
@bmc08gt
bmc08gt merged commit 2e212cc into main Oct 5, 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