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
add: Android share-sheet target — receive files/text from other apps
Register Vector as an ACTION_SEND / ACTION_SEND_MULTIPLE target so other apps
can share files, media, and text into it; the user picks a chat and sends.
Mirrors the deep-link model (a share foregrounds the activity, so it's never
headless): MainActivity forwards the content:// URIs + text to native, which
queues them (PENDING_SHARE) for a cold start and emits `share_received` live.
The frontend polls get_pending_share on init / listens live, drops the user on
the chat list with a "Choose a chat to forward to" toast, and on chat-open
attaches the share — files via the existing file-preview, text into the composer.
- Manifest SEND/SEND_MULTIPLE intent-filters; MainActivity handleSendIntent
(cold + warm) with API-version-safe EXTRA_STREAM extraction.
- share.rs (PENDING_SHARE + get_pending_share command) + JNI bridge + ACL.
- Only accept content:// URIs — rejects file:// so a crafted share can't coax
a read of our own private files.
Also fixes the Android content-URI read path these shares exercised:
- Stop percent-decoding URIs before Uri.parse — it corrupted nested-encoded
provider URIs (e.g. Google Photos' wrapper around an encoded content:// URI).
The encoded form is what ContentResolver expects; simple SAF picks resolve
identically (so avatars were unaffected).
- Clear the pending JNI exception after the best-effort
takePersistableUriPermission (share grants aren't persistable; the stale
exception poisoned the following query/openInputStream).
- openFilePreview: don't render a video player on Android (generic icon, like
the in-app attach path); desktop keeps inline players.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments