aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-10 14:40:05 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-10 14:40:05 +0200
commitaed32f20625a6206628b577d743d96552f81e91a (patch)
treeaf2eaf3336804f2e4af37445326e52a19b2af169 /packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
parent2f2a9a6542d2194e50ffba6f382e4fdffd481838 (diff)
downloadmeshbay-aed32f20625a6206628b577d743d96552f81e91a.tar.gz
feat(android): back text messages up, in a build Play does not get
A Messages section sends the SMS added since the last copy, as restorable <smses> XML, into <folder>/<account>-messages/YYYY. A play flavor has neither READ_SMS nor the code that reads messages; full is the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js')
-rw-r--r--packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js b/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
index b64d7f2..fb613a3 100644
--- a/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
+++ b/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js
@@ -15,10 +15,11 @@
* that refuses: `platform.js` decides what to show from whether an object
* exists (`platform.node.available`, `platform.folder.available`, …).
*
- * `HUB_BASE`, `BINARY` and `CAST` are prepended by the shell when it injects
- * this file: the interface asks for the hub while its modules load, before
+ * `HUB_BASE`, `BINARY`, `CAST` and `MESSAGES` are prepended by the shell when
+ * it injects this file: the interface asks for the hub while its modules load, before
* anything can await; BINARY says whether the WebView carries ArrayBuffer
- * messages; CAST whether this device can cast at all.
+ * messages; CAST whether this device can cast at all; MESSAGES whether this
+ * build backs text messages up (not the Play build).
*/
(function () {
'use strict';
@@ -233,6 +234,18 @@
failed: (code, text) => call('contactsync:failed', code, text),
},
+ // Messages backup (§9.13), the same way as contacts: the messages added
+ // since the last file the node took. Only in a build that may read them.
+ ...(MESSAGES ? { messageSync: {
+ status: () => call('messagesync:status'),
+ permit: () => call('messagesync:permit'),
+ configure: (settings) => call('messagesync:configure', settings || null),
+ plan: () => call('messagesync:plan'),
+ sent: (token, dir, name) => call('messagesync:sent', token, dir, name),
+ completed: () => call('messagesync:completed'),
+ failed: (code, text) => call('messagesync:failed', code, text),
+ } } : {}),
+
// Where downloads go, chosen once. A display name comes back, never a URI.
folder: {
choose: () => call('folder:choose'),