@robono/messaging-react-native 0.6.0 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.7.0 — unreleased
2
+
3
+ Supply automatic Expo calling, Maps and connected chat extras. Use Messenger attachment menus, grouped media, bounded dialogs and anchored inbox actions. Connect managed call alerts, unanswered-call messages and call-aware media audio. Stop location and pending uploads during account cleanup.
4
+
1
5
  ## 0.6.0 — release candidate
2
6
 
3
7
  Clear local chat immediately when the complete Expo connection signs out, before waiting for notification cleanup. Supports the account lifecycle templates generated by server 0.20.
package/README.md CHANGED
@@ -2,6 +2,48 @@
2
2
 
3
3
  Use a ready-made direct or group conversation screen, replace its sections, or compose the exported components into your own layout. Use `ExpoMessenger` for the complete inbox and conversation flow, or the individual components inside your existing navigation. The complete Expo messenger connects notification registration; nothing requests permission on mount. The shared icon controls require `react-native-svg` (install it with your framework’s native dependency installer).
4
4
 
5
+ ## Connected features
6
+
7
+ The complete messenger connects selected calling, chat weather/tracking and Maps
8
+ through the same authenticated server route. Customers do not supply fake demo
9
+ callbacks or create separate call controllers for this setup. Feature selection
10
+ and appearance remain in **Features & preview**. Advanced custom interfaces can
11
+ still use individual components and callbacks.
12
+
13
+ Synchronize permitted contacts once on your server:
14
+
15
+ ```ts
16
+ await messenger.synchronizeContact({
17
+ externalUserIds: [firstUserId, secondUserId],
18
+ allowed: currentPermission,
19
+ revision: savedPermissionRevision,
20
+ });
21
+ ```
22
+
23
+ This atomically updates texting and calling permission. It does not buy a service,
24
+ start a call or start location tracking. Use a saved, increasing revision from your
25
+ own database; retries with the same values are safe. Keep group membership in the
26
+ messaging group API; eligible groups use that same membership for calls. Supergroups
27
+ never start calls, and voice/video calls remain limited to eight people.
28
+
29
+ The host's `authorize` function checks `calling.*`, `extras.*` and `location.*` as
30
+ well as messaging operations. Account checks have no conversation ID; call actions
31
+ use the actual conversation from the service, never a caller-supplied claim. Keep
32
+ current membership, suspension and feature restrictions in those checks.
33
+
34
+ Incoming calls use the same configured notification providers as messages. The
35
+ supplied client registers its call handler automatically. Native apps need their
36
+ own Apple APNs key/bundle ID and Google Firebase service account; upload them only
37
+ to Robono's private notification setup. A website needs its HTTPS origin and chat
38
+ path, not Apple/Google keys. Users still choose whether to allow notifications.
39
+ These are ordinary app/browser alerts: the OS can delay or suppress them, and an
40
+ alert never answers a call or turns on a microphone automatically.
41
+
42
+ Await the returned `signOut()` before ending your own login session. It stops
43
+ capture and calls, cancels unfinished tracking and unregisters the device. Old
44
+ account credentials and unfinished work must never be reused for another person.
45
+
46
+
5
47
  ## Recommended installation
6
48
 
7
49
  Connect `createRobonoMessengerServer` from `@robono/server` at one authenticated
@@ -140,6 +182,8 @@ The bundled adapter uses your private storage endpoint, described below. You can
140
182
 
141
183
  ## Private media endpoint
142
184
 
185
+ The complete `createRobonoMessengerServer` route already supplies managed private uploads, downloads, metadata verification and configured screening. No separate storage implementation is needed. Only follow this section when deliberately using your own storage.
186
+
143
187
  Mount `createMessagingMediaBackendAdapter` from `@robono/server` behind your existing session authentication. Supply the same `RobonoMessagingBackend` as your messaging endpoint, your authorization checks, and a `MessagingPrivateStorage` implementation for your storage provider. The adapter checks current conversation access and policy before asking storage for a transfer. Phone requests never contain Robono API keys or storage credentials.
144
188
 
145
189
  The storage implementation has four operations:
@@ -151,12 +195,12 @@ The storage implementation has four operations:
151
195
 
152
196
  The HTTP protocol uses POST with `{operation, ...}`. `prepare` takes `uploadId`, `conversationId`, `kind`, and `file` metadata; it returns `{url, headers?}` or `{media}` for an already verified upload. `complete` takes `uploadId` and `conversationId`, returning `{media}`. `download` takes `conversationId` and `messageId`, returning `{url, headers?, media}`. `discard` takes `uploadId`, returning `{ok:true}`. Errors use `{error:{code,message}}` and an appropriate HTTP status.
153
197
 
154
- Also supply `resolveMedia` to `createMessagingBackendAdapter`, resolving the authenticated actor, conversation and asset ID to your verified stored metadata. This replaces untrusted phone claims before sending. Keep asset IDs opaque and unique per message. Check blocks/permissions in both endpoints. Restrict signed uploads to the prepared object and size where supported; delete rejected objects. Expire abandoned uploads and private cache files through your storage lifecycle. Your app owns storage and any malware/content checks appropriate to its policy; the SDK does not upload files to public storage or scan private conversations.
198
+ Also supply `resolveMedia` to `createMessagingBackendAdapter`, resolving the authenticated actor, conversation and asset ID to your verified stored metadata. This replaces untrusted phone claims before sending. Keep asset IDs opaque and unique per message. Check blocks/permissions in both endpoints. Restrict signed uploads to the prepared object and size where supported; delete rejected objects. Expire abandoned uploads and private cache files through your storage lifecycle. With custom storage, your app owns storage retention and any malware/content checks; configure these separately from Robono’s managed screening. Files must remain private.
155
199
 
156
200
  Handle signed `messaging.message_removed` events to revoke and delete assets when history expires. Account deletion must also erase associated storage. A terminated app cannot run cache cleanup; the adapter's temporary files live under the OS cache directory, which can be purged by the OS. Do not treat device cache eviction as a fixed retention guarantee.
157
201
 
158
202
 
159
- ### Design messaging and calling together
203
+ ### Custom composition: messaging and calling
160
204
 
161
205
  The website Experience builder renders these messaging components and the optional calling components, with a local conversation transport. Saving a draft creates an immutable design version without changing active settings. Review and apply updates messaging and calling atomically, with revision checks against the existing editors. Use your existing settings/appearance fetches to receive the applied design. Service access and per-contact eligibility still apply.
162
206
 
@@ -177,7 +221,7 @@ The `/calling` entry additionally needs the optional `@robono/calling-react-nati
177
221
 
178
222
  The website preview renders the same bubbles, inline voice controls, full-screen photo/file viewer and video transport controls through React Native Web. Phone/tablet and portrait/landscape choices resize the real layout viewport without reloading the conversation. Browser media elements and Expo players drive the shared controls; the browser preview does not substitute native browser player controls or a generic dialog. Camera/library/file selection and OS permission prompts still follow the platform. Preview interactions never contact real users or send billable events.
179
223
 
180
- The standard chat uses compact grouped bubbles, timestamps at the lower right, inline voice controls and an expandable attachment tray below the composer. Attach dismisses the keyboard; tap it again to return to typing. Android Back closes the tray first. The microphone remains available beside the text field, including while text is typed; Send is enabled when there is text or a finished voice recording. Camera remains available when capture is enabled, including with typed text or a reviewed voice recording. Captures join the existing pending attachments. New designs start with a light chat palette; existing saved colors remain unchanged. The builder’s “Use classic chat colors” action applies the default palette to the draft without changing enabled features.
224
+ The standard chat uses compact grouped bubbles, a curved delivery indicator, swipe-to-reveal time, inline voice controls and Messenger’s attachment menu. Attach dismisses the keyboard; tap it again to return to typing. Android Back closes the tray first. The microphone remains available beside the text field, including while text is typed; Send is enabled when there is text or a finished voice recording. Camera remains available when capture is enabled, including with typed text or a reviewed voice recording. Captures join the existing pending attachments. New designs start with a light chat palette; existing saved colors remain unchanged. The builder’s “Use classic chat colors” action applies the default palette to the draft without changing enabled features.
181
225
 
182
226
  Voice-only conversations use Robono Messenger’s compact composer: the duration-limit placeholder, embedded microphone and adjacent Send control. The Expo adapter records and reviews audio inline, with elapsed time, microphone metering, playback and removal before sending. The builder uses the same controls with a local browser microphone recording; no audio is uploaded from the preview. When texting is enabled, tap the microphone to record in the composer and tap it again to stop. Each completed recording becomes a separate playable attachment in the shared horizontal row, and the microphone is available for another recording. Typed text is preserved; Send puts accompanying text on the last attachment as its caption. Custom media adapters can use `components.VoiceComposer`, `VoiceMessageComposer` and `VoiceDraftPlayback`; `renderTextComposer` restores the text controls alongside the reviewed recording.
183
227
 
@@ -196,7 +240,7 @@ Enable reactions and polls in Experience builder. The screen includes the long-p
196
240
 
197
241
  ## Optional message after no answer
198
242
 
199
- Use `ExpoMessagingCallingScreen` from `@robono/messaging-react-native/expo-calling` for the supplied native media tools together with calling. It accepts the same `storage` and `audioSession` as `ExpoMessagingScreen`. For your own media adapter, use `MessagingCallingScreen` from the `/calling` entry to combine the optional call button and message composer. Connect the calling controller's `onUnansweredCall` callback to your existing conversation navigation, then pass `unansweredCallId` and `onDismissCallMessage`. The callback only runs for an outgoing call made in the current controller session that ended without an answer; opening old missed-call history does not trigger it.
243
+ The complete `createExpoMessenger` flow connects unanswered-call messages automatically. For custom composition, use `ExpoMessagingCallingScreen` from `@robono/messaging-react-native/expo-calling` for the supplied native media tools together with calling. It accepts the same `storage` and `audioSession` as `ExpoMessagingScreen`. For your own media adapter, use `MessagingCallingScreen` from the `/calling` entry to combine the optional call button and message composer. Connect the calling controller's `onUnansweredCall` callback to your existing conversation navigation, then pass `unansweredCallId` and `onDismissCallMessage`. The callback only runs for an outgoing call made in the current controller session that ended without an answer; opening old missed-call history does not trigger it.
200
244
 
201
245
  `UnansweredCallMessage` is also exported separately for a custom composer. Place it inside `MessagingProvider` and supply your existing `pickAttachment` adapter. The adapter must support recording, review and private upload. Eligibility comes from your authenticated backend, and sending rechecks permissions. Recording is optional and starts only when the caller chooses it. An ordinary message is left in the chat, with normal history, retry and media rules.
202
246
 
@@ -206,7 +250,7 @@ The conversation header’s three-dot menu includes Search this chat, plus Block
206
250
 
207
251
  Blocking retains history and stops direct messages and calls for that pair in your app. Shared group messages remain visible. Reporting is separate: it shares the selected message, or up to five recent incoming messages, and the reason with your app’s moderators. It confirms success only after storage acknowledges the report. The SDK reuses the request ID on retry. Owners and administrators review reports in the Messaging workspace; private media is reviewed through your app’s authorized storage tools.
208
252
 
209
- Enable Reactions to show an emoji ribbon beside the long-pressed bubble, or the hover smile icon on desktop. Selected reactions stay attached below the message. Polls are interactive chat messages created from the attachment menu. Transcript is a separate voice-message action. In the header's three-dot menu, choose translation **Off / Text / Voice** and languages once for the conversation. The saved choice controls Translate or Play Translation on eligible incoming messages; own messages and matching sender/target languages do not show it. The result has Show original / Show translation controls. Expo supplies translated-voice playback and its audio session; an explicit Play Translation action starts playback when ready. `language` supplies the initial target and `contact.language` / `participants[id].language` supply known sender languages, with a saved conversation incoming-language fallback. Defaults to Off. The Expo private outbox retains preferences across restarts on this device. Custom contact menus can call `client.setTranslationPreference({mode:'text',language:'es',sourceLanguage:'en'})`. Connect `MessagingClient.transformRequest` to the authenticated `createMessagingTransformBackendAdapter` on your server.
253
+ Enable Reactions to show an emoji ribbon beside the long-pressed bubble, or the hover smile icon on desktop. Selected reactions stay above the delivery indicator. Polls are interactive chat messages created from the attachment menu. Transcript is a separate voice-message action. In the header's three-dot menu, choose translation **Off / Text / Voice** and languages once for the conversation. The saved choice controls Translate or Play Translation on eligible incoming messages; own messages and matching sender/target languages do not show it. The result has Show original / Show translation controls. Expo supplies translated-voice playback and its audio session; an explicit Play Translation action starts playback when ready. `language` supplies the initial target and `contact.language` / `participants[id].language` supply known sender languages, with a saved conversation incoming-language fallback. Defaults to Off. The Expo private outbox retains preferences across restarts on this device. Custom contact menus can call `client.setTranslationPreference({mode:'text',language:'es',sourceLanguage:'en'})`. Connect `MessagingClient.transformRequest` to the authenticated `createMessagingTransformBackendAdapter` on your server.
210
254
 
211
255
  ### November 1 behavior update (unpublished)
212
256
 
@@ -337,3 +381,15 @@ app does not prevent server delivery afterward. The selected time is approximate
337
381
  to the minute. Current access, screening and spending rules still apply at send
338
382
  time. In-app voice recording and poll creation retain their existing immediate-send
339
383
  flows; custom composers can schedule their finalized content through the same API.
384
+
385
+ ### Screen sharing in the complete messenger
386
+
387
+ The installer configures `@robono/calling-react-native` with `video:true` and
388
+ `screenSharing:true`. On iPhone, your Apple Developer team must sign both the app
389
+ and generated `RobonoScreenBroadcast` extension with the App Group
390
+ `group.<your bundle ID>.calling` (or your explicit plugin override). Xcode/EAS can
391
+ register these using your Apple account. Android asks for screen-capture permission
392
+ when the person starts sharing. Rebuild both apps after native configuration changes.
393
+ The server's selected feature and current contact permissions still control access.
394
+ An existing explicit `screenSharing:false` is preserved by upgrades; enable it and
395
+ rebuild before offering screen sharing in that app.