You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cca6d0b
Browse filesBrowse the repository at this point in the historyBrowse files
The transport and storage half of chat photos, ported from
code-ios-app#959. Nothing in the app calls it yet; the UI follows in a
stacked PR.
- Encoding: photos are downscaled and encoded as JPEG down a quality
ladder of 0.9, 0.8, 0.7, 0.6 until they fit the blob policy, with EXIF
orientation baked in and a BlurHash for the placeholder. The
chat_media.json vectors are the iOS file, byte for byte.
- Encrypted chats: the blob is sealed with the shared-core ChatCipher,
uploaded with the `chat` field, and sent as EncryptedContent. A photo
that can't be opened loads as ChatPhotoUnavailable.
- Sending: one message per photo, each retried on its own. Finalization
polls GetBlobs every 2s, at most 30 times, counted only while the app
is in the foreground.
- Storage: pending uploads live in Room (schema 43) with the JPEG in
filesDir, so a send resumes after the app is killed.
- Loading: a Coil fetcher keyed `chat-media-<blobId>`, registered in
FlipcashApp.
- Fixes found on the way: captions were never sent, because `caption`
inside the builder's `apply` resolved to the builder's own field; and
a sent message disappeared when the stream delivered its stored copy
before the send returned, because clearing the pending row deleted by
its client id.
0 commit comments