@robono/messaging-react-native 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/BRIDGE-MESSENGER.md +66 -0
  2. package/CHANGELOG.md +13 -0
  3. package/README.md +21 -1
  4. package/SBOM.spdx.json +567 -279
  5. package/dist/account.js +5 -3
  6. package/dist/appearance-context.d.ts +11 -0
  7. package/dist/appearance-context.js +5 -0
  8. package/dist/attachment-menu.js +9 -6
  9. package/dist/brand.js +5 -4
  10. package/dist/calling.js +3 -2
  11. package/dist/chat-options.d.ts +12 -0
  12. package/dist/chat-options.js +25 -0
  13. package/dist/contact-directory.js +3 -3
  14. package/dist/conversation-details.d.ts +2 -0
  15. package/dist/conversation-details.js +7 -5
  16. package/dist/expo-bridge.d.ts +22 -0
  17. package/dist/expo-bridge.js +29 -0
  18. package/dist/expo-history.js +1 -1
  19. package/dist/expo-media.js +2 -2
  20. package/dist/expo-messenger.js +14 -4
  21. package/dist/expo-outbox.js +1 -1
  22. package/dist/expo-screen.js +15 -11
  23. package/dist/expo-storage-digest.d.ts +1 -0
  24. package/dist/expo-storage-digest.js +5 -0
  25. package/dist/expo.d.ts +1 -0
  26. package/dist/expo.js +1 -0
  27. package/dist/extras.d.ts +3 -1
  28. package/dist/extras.js +5 -3
  29. package/dist/forward.js +4 -3
  30. package/dist/group-editor.js +6 -3
  31. package/dist/header-calls.js +4 -3
  32. package/dist/inbox-search.js +4 -3
  33. package/dist/inbox.js +12 -9
  34. package/dist/index.d.ts +16 -2
  35. package/dist/index.js +157 -70
  36. package/dist/media-ui.js +15 -7
  37. package/dist/message-menu.d.ts +2 -1
  38. package/dist/message-menu.js +9 -4
  39. package/dist/native-outbox.d.ts +2 -1
  40. package/dist/native-outbox.js +20 -3
  41. package/dist/polls.js +10 -6
  42. package/dist/popup.d.ts +5 -2
  43. package/dist/popup.js +13 -7
  44. package/dist/public-rooms.js +4 -2
  45. package/dist/quick-send.js +2 -2
  46. package/dist/room-moderation.js +9 -4
  47. package/dist/safety.d.ts +5 -2
  48. package/dist/safety.js +16 -10
  49. package/dist/saved.js +3 -2
  50. package/dist/scheduled.js +11 -6
  51. package/dist/search.js +4 -2
  52. package/dist/sign-in.js +9 -7
  53. package/dist/social.d.ts +5 -0
  54. package/dist/social.js +4 -3
  55. package/dist/storage-digest-cache.d.ts +2 -0
  56. package/dist/storage-digest-cache.js +19 -0
  57. package/dist/translation-settings.js +5 -3
  58. package/dist/typography.d.ts +8 -3
  59. package/dist/typography.js +22 -9
  60. package/dist/use-quote-gesture.js +7 -3
  61. package/examples/existing-bridge-chat.tsx +44 -0
  62. package/package.json +12 -6
  63. package/setup.plugin.cjs +1 -0
@@ -0,0 +1,66 @@
1
+ # Existing Bridge friends in the standard Messenger
2
+
3
+ Required versions: `@robono/messaging` **0.13.0**, `@robono/server` **0.32.0**, and `@robono/messaging-react-native` **0.18.0** (Expo) or `@robono/messaging-web` **0.17.0** (web). Use `@robono/location` **0.4.1** for the screen package's shared appearance helpers; this does not enable Maps or location access.
4
+
5
+ Server: `npm install @robono/server@0.32.0`
6
+
7
+ Expo: `npm install @robono/messaging@0.13.0 @robono/messaging-react-native@0.18.0 @robono/location@0.4.1`
8
+
9
+ Web: `npm install @robono/messaging@0.13.0 @robono/messaging-web@0.17.0 @robono/location@0.4.1`
10
+
11
+ The Expo integration uses the existing supported Expo 55/56 native dependencies. This connector adds no new native dependency. Keep the host's existing supported peers and native configuration. The service endpoint is `https://api.robono.com/v1/bridge/messenger`; a 404 there means the service route is not deployed yet, not that a replacement friend must be created.
12
+
13
+ ## What the connector connects
14
+
15
+ An already accepted external-app user ↔ actual Robono-app user relationship, identified by its existing `child_app_connections.id`. It reads the original Bridge messages and receipts. Message UUIDs, external send IDs, timestamps, attachment batches and retained history are preserved. No shadow person, replacement friend, history import, copied chat or new permission writer is required.
16
+
17
+ This connector is for a direct phone Bridge connection. App-to-app Bridge connections have a separate identity model and are not silently treated as phone Bridge connections.
18
+
19
+ ## Customer setup
20
+
21
+ 1. Keep the existing accepted connection ID from the Bridge friend list.
22
+ 2. Add one authenticated backend route with `createBridgeMessengerBackendAdapter` from `@robono/server`. Give it the server API key, the existing sign-in verifier and the existing per-friend authorization function. Return the exact external user ID already registered on the Bridge. The key stays on the server.
23
+ 3. In Expo, call `createExpoBridgeMessenger` from `@robono/messaging-react-native/expo`. Pass the route URL, signed-in external user ID, connection ID and session-token getter. Call its `open()` once when the screen mounts; give its `client`, `storage` and `audioSession` to the standard `ExpoMessagingScreen`. The client already holds the existing connection ID.
24
+ 4. Keep existing Bridge notifications. Pass the hint's `{connection_id}` to `handlePush`; the SDK reloads authorized content. On a notification tap, open the existing friend's connection. Do not create another conversation.
25
+
26
+ Examples:
27
+
28
+ - `packages/server/examples/existing-bridge-route.ts`
29
+ - `packages/messaging-react-native/examples/existing-bridge-chat.tsx`
30
+ - `packages/messaging-web/examples/existing-bridge-chat.tsx`
31
+
32
+ The included examples import the public package exports and are checked against the exact release archives.
33
+
34
+ ## Permissions
35
+
36
+ The customer's `authenticate` and `authorize` functions run on every operation, and run again after provider work before returning content. `authorize` must check the current user, accepted friend, pauses, schedules, account access and operation. A wait is still a read and must be authorized. The service separately checks the API-key owner, external user, accepted connection and recipient availability. A phone-supplied actor ID is replaced with the authenticated identity.
37
+
38
+ Keep the customer's existing versioned Bridge capability writer. Outbound capabilities determine the composer. Inbound capabilities determine incoming content. Denied or expired content is redacted, and new attachment URLs require fresh authorization. This adapter never changes either party's rules. Website appearance is used as a default; it cannot grant a denied feature.
39
+
40
+ On a host-side permission change, immediately refresh the open client; if account access ends, call `signOut()` and close the screen. While a stricter capability update is pending in the host's existing permission outbox, `authorize` must reject affected operations until the Bridge acknowledges the revision. The callback receives the operation and optional kind/message/upload/asset identifiers for the host to resolve against its own records; these identifiers are lookup hints, not proof of permission. Signing out clears that connection's persisted data. Disposing a screen preserves its draft for reopening. A previously issued private media URL can remain valid for at most 60 seconds; already downloaded bytes cannot be recalled.
41
+
42
+ The standard screen accepts the same `components` and `header` options as within-app chats. A host can hide or replace the header while retaining Robono's message list, composer and viewer. No friend-switching dropdown or close button is required by this connector.
43
+
44
+ ## Attachments and recovery
45
+
46
+ The supplied storage adapter prepares, uploads and screens a private staging object, then sends it through the existing Bridge delivery service. The original Bridge owns the delivered attachment. Thumbnails, the standard viewer, waveform display choices and attachment batches are retained. Stored waveforms are not deleted when hidden; the connector withholds them when the Bridge connection disallows receiving them, and the screen also respects the saved display choice.
47
+
48
+ `onDownloadAttachment` receives an authorized temporary file. Copy it into the host's private Files destination before resolving; the SDK then removes its temporary copy. Honor its cancellation signal. `mediaViewer` controls Share, Forward, Download and Open; `linkHandling` controls URL/address taps and disabled links. These are the same shared options as ordinary Messenger, not a separate Bridge viewer.
49
+
50
+ A failed send retries its original `clientMessageId`. The service checks the durable Bridge send receipt before using an attachment URL. If delivery already happened, it returns the original message—or an acknowledgement if retention already removed it. If not, it obtains a fresh source URL for the same staged object. It never resends under a new ID automatically. Staging objects expire after 24 hours; if an undelivered object has expired, the user must choose the file again. Finished deliveries do not depend on staging lifetime.
51
+
52
+ ## Live updates and retained history
53
+
54
+ One cancellable wait is active while the standard screen is open. A healthy idle screen makes about three wait requests per minute, plus initial/history reads and actual user actions. There is no parallel three-second polling loop. Database changes wake the wait; a persisted revision recovers changes missed while disconnected. A wait ends within 20 seconds even if a hint is lost. Failed transport uses the client's bounded retry/backoff. Do not run a second reconciliation loop alongside the supplied client.
55
+
56
+ The durable wake covers message creation/change/deletion, receipt changes and connection permission updates. Older loaded messages are rechecked after a change. Revocation clears the open history when observed. Push notification contents are hints only; message text, URLs and permissions always come from a new authorized read.
57
+
58
+ `conversationMode="walkie-talkie"` changes presentation, not retention. It does not repost recordings. Bridge history rules remain authoritative; previously expired or retired messages cannot be restored by switching back to full chat.
59
+
60
+ This release does not invent unsupported Bridge reactions, threaded replies, polls, groups, scheduled sends or presence. Their controls remain unavailable in these direct Bridge chats. Delivery/read/heard receipts retain their existing meanings; a heard receipt is not a new claim of complete playback. The separate online-status, phrase-detection and detailed playback-event requests require their own contracts and are not enabled by this connector.
61
+
62
+ ## Release requirements
63
+
64
+ Release together: migration `20261108040000_standard_bridge_messenger.sql`, function `external-app-bridge-messenger`, API router `/v1/bridge/messenger`, and core/server/Expo/web packages. Verify deployment before publishing supported install versions. Website/API uploads remain owner-operated.
65
+
66
+ Local verification uses synthetic accepted Bridge connections in an isolated service, through the public adapter and standard screens. iPhone and Android checks cover photo, video, document and voice upload/send/download, thumbnails, native voice playback, changing permissions and revoked access. Browser checks cover opening retained history and sending through the standard composer. Service checks cover original IDs, pagination, private access, duplicate prevention after a lost response and recovery after a missed notification. This is not a claim that a new push notification was delivered through Apple's or Google's service in this check.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 0.18.0
2
+
3
+ Adds the standard Expo Bridge connector, original-message read receipts, retained history and shared attachment handling.
4
+
5
+ ## Unreleased
6
+
7
+ - Coalesce queued draft updates into one durable write while preserving reads, sends, clears and storage-error handling.
8
+
9
+ - Retain unchanged message rows and media-tool callbacks while updating permissions, reactions, translations, appearance and host controls normally.
10
+ - Keep calling-tool and group/notes contact references stable so typing does not redraw existing bubbles; group names and host contact changes still update normally.
11
+
12
+ - Complete Expo photo/video saving setup: declare the photo-library dependency and configure the required Apple and Android permissions through the shared setup plugin.
13
+
1
14
  ## 0.15.0
2
15
 
3
16
  ## 0.16.0
package/README.md CHANGED
@@ -165,7 +165,7 @@ The optional `@robono/messaging-react-native/expo` entry supplies recording, rev
165
165
  Install native dependencies with your Expo project's installer so their versions match your SDK:
166
166
 
167
167
  ```sh
168
- npx expo install expo-audio expo-image-picker expo-document-picker expo-file-system expo-sharing expo-video expo-crypto react-native-safe-area-context react-native-svg
168
+ npx expo install expo-audio expo-image-picker expo-document-picker expo-file-system expo-media-library expo-sharing expo-video expo-crypto react-native-safe-area-context react-native-svg
169
169
  ```
170
170
 
171
171
  This entry targets Expo SDK 55–56; the core components do not require Expo.
@@ -565,3 +565,23 @@ are display choices, never permission grants: entries still require the feature
565
565
  user authorization. Account access and permitted Block/Report actions stay available.
566
566
  A host-provided `appearance` overrides server appearance; omit it to follow saved
567
567
  website settings. A host-provided `companyName` overrides the configured app name.
568
+
569
+ ## Profile, media and chat options
570
+
571
+ The conversation menu provides Profile (Group details for groups), Shared media,
572
+ and Chat options. Chat options contains notification muting, Privacy Lens when
573
+ allowed, and confirmed deletion of the current user's chat history. Deleting a
574
+ chat leaves the other person's copy intact; a new incoming message can return
575
+ the chat to the inbox. The complete Messenger connects these actions to the
576
+ authenticated inbox automatically.
577
+
578
+ When composing only a conversation screen with your own inbox, supply
579
+ `conversationActions={{ muted, setMuted, deleteConversation }}`. Both callbacks
580
+ return a promise and must enforce the signed-in user's permissions on your
581
+ server. Unavailable actions are hidden. Website customization controls the
582
+ menu entries through `appearance.menus.chat.items.media` and `.options`; it
583
+ does not grant access that the user's permissions deny.
584
+
585
+ ## Existing Bridge friends
586
+
587
+ Open an already accepted external-app user ↔ Robono-user connection in the standard Messenger using the original connection ID and retained history. See [the Bridge Messenger guide](./BRIDGE-MESSENGER.md) and the included `examples/existing-bridge-chat.tsx`. This connector requires the matching core 0.13.0, server 0.32.0 and Expo 0.18.0 or web 0.17.0 release.