From 273f2b61d041df7fa1763afb4e4ff745dff0cab8 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 3 Dec 2025 12:16:51 +0000 Subject: [PATCH] Docs: document /restart WhatsApp command --- README.md | 1 + docs/refactor/web-relay-troubleshooting.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index baea54ef6..7f17c2ce5 100644 --- a/README.md +++ b/README.md @@ -236,5 +236,6 @@ Templating tokens: `{{Body}}`, `{{BodyStripped}}`, `{{From}}`, `{{To}}`, `{{Mess - Does this store my messages? warelay only writes `~/.warelay/warelay.json` (config), `~/.warelay/credentials/` (WhatsApp Web auth), and `~/.warelay/sessions.json` (session IDs + timestamps). It does **not** persist message bodies beyond the session store. Logs stream to stdout/stderr and also `/tmp/warelay/warelay-YYYY-MM-DD.log` (configurable via `logging.file`). - Personal WhatsApp safety: Automation on personal accounts can be rate-limited or logged out by WhatsApp. Use `--provider web` sparingly, keep messages human-like, and re-run `login` if the session is dropped. - Limits to remember: WhatsApp text limit ~1600 chars; avoid rapid bursts—space sends by a few seconds; keep webhook replies under a couple seconds for good UX; command auto-replies time out after 600s by default. +- Control via WhatsApp: from an allowed sender, send `/restart` (or `restart`) to trigger a launchd restart of the warelay agent (`com.steipete.warelay`). Useful when Baileys sessions get wedged; wait a few seconds for it to come back up. - Deploy / keep running: Use `tmux` or `screen` for ad-hoc (`tmux new -s warelay -- pnpm warelay relay --provider twilio`). For long-running hosts, wrap `pnpm warelay relay ...` or `pnpm warelay webhook --ingress tailscale ...` in a systemd service or macOS LaunchAgent; ensure environment variables are loaded in that context. - Rotating credentials: Update `.env` (Twilio keys), rerun your process; for Web provider, delete `~/.warelay/credentials/` and rerun `pnpm warelay login` to relink. diff --git a/docs/refactor/web-relay-troubleshooting.md b/docs/refactor/web-relay-troubleshooting.md index 0274b82a3..214b28f2c 100644 --- a/docs/refactor/web-relay-troubleshooting.md +++ b/docs/refactor/web-relay-troubleshooting.md @@ -5,6 +5,7 @@ - **Logged out:** Console prints “session logged out”; re-link with `warelay login --provider web`. - **Repeated retries then exit:** Reconnects are capped (default 12 attempts). Tune with `--web-retries`, `--web-retry-initial`, `--web-retry-max`, or config `web.reconnect`. - **No inbound messages:** Ensure the QR-linked account is online in WhatsApp, and check logs for `web-heartbeat` to confirm auth age/connection. +- **Fast nuke:** From an allowed WhatsApp sender you can send `/restart` to kick `com.steipete.warelay` via launchd; wait a few seconds for it to relink. ## Helpful commands - Start relay web-only: `pnpm warelay relay --provider web --verbose`