diff options
Diffstat (limited to 'packages/meshbay-android/app/src/main/assets/bridge')
| -rw-r--r-- | packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js | 19 |
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'), |