aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/platform.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-10 16:29:20 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-10 16:29:20 +0200
commit7957fa686eb6e8cf57bcb62ff4e6d2785693030b (patch)
tree562195088fa40bc4db85193956bdd8aaf00e31f5 /packages/meshbay-hub/src/meshbay_hub/static/platform.js
parent24547e4efd3a45b36b3bea8c29cfc687230a6d3a (diff)
downloadmeshbay-7957fa686eb6e8cf57bcb62ff4e6d2785693030b.tar.gz
feat(android): back up WhatsApp's own chat backups, and its media if asked
A WhatsApp section takes WhatsApp's folder through the picker, sends its encrypted Databases and Backups (not the dated copies of earlier weeks) into <folder>/<account>-whatsapp, and names the restore set in the manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/platform.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/platform.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/platform.js b/packages/meshbay-hub/src/meshbay_hub/static/platform.js
index b1a8ae9..596c327 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/platform.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/platform.js
@@ -296,6 +296,27 @@ export const driveSync = {
};
/**
+ * Backing up WhatsApp's own folder, chosen once through the picker (its
+ * encrypted chat backups, and its media if asked), like `driveSync`.
+ */
+const waBridge = bridge && bridge.whatsappSync;
+export const whatsappSync = {
+ available: Boolean(waBridge),
+ status() { return waBridge.status(); },
+ chooseFolder() { return waBridge.chooseFolder(); },
+ forgetFolder(id) { return waBridge.forgetFolder(id); },
+ configure(settings) { return waBridge.configure(settings); },
+ plan() { return waBridge.plan(); },
+ sent(token, dir, name) { return waBridge.sent(token, dir, name); },
+ manifest() { return waBridge.manifest(); },
+ manifestSent(token) { return waBridge.manifestSent(token); },
+ completed() { return waBridge.completed(); },
+ failed(code, text) { return waBridge.failed(code, text); },
+ keepAlive(on, text) { return waBridge.keepAlive(on, text); },
+ file: (token, name, size) => rangedFile('/wasync/', token, name, size),
+};
+
+/**
* Where every backup of this phone goes: one folder of a group the account
* owns and is alone in (docs/MESHBAY_DESIGN.md §9.12). Android only, like
* `photoSync`. See sync-destination.js.