You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document per-session config support across all plugins and the spec (#40)
Make per-session config support explicit and discoverable at three layers:
1. PLUGIN-STANDARD.md (spec) — expand the Per-session config section with
the author requirement (re-read ctx.config inside the hook, not a
cached snapshot), the two correct patterns (per-event re-parse for
plain config; config-signature caching for stateful coordinators), an
explicit anti-pattern callout (cache-at-enable breaks overrides, the
source of PRs #38/#39), and a documentation requirement for READMEs.
2. Root README — add a 'Per-session config support' matrix table after
the plugin catalog so operators can see at a glance which plugins
honor per-session overrides (✅/⚠️/❌) and the caveat for each.
3. Each plugin README — add a '### Per-session config' subsection under
Compatibility with the support tier (full / caveat / not supported),
the fields that may be overridden, and any workaround (e.g. one
instance per session for multi-backend isolation or single-sink
designs). gsheets-logger's existing note is aligned to the same
heading format.
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,27 @@ The table above is generated from each plugin's `manifest.json` + `CHANGELOG.md`
50
50
(and mirrored in [`plugins.json`](./plugins.json)). See [PLUGIN-STANDARD.md](./PLUGIN-STANDARD.md) for the
51
51
metadata standard every plugin follows.
52
52
53
+
## Per-session config support
54
+
55
+
OpenWA's `sessionScoped` plugins (the default) may carry per-session config **overrides** set via the
56
+
dashboard — so two WhatsApp sessions under one plugin instance can run different settings. A plugin
57
+
honors overrides only if it re-reads `ctx.config` inside its hook (not a cached snapshot from enable).
58
+
The table below is the status for each plugin in this repo. See each plugin's README **Compatibility →
59
+
Per-session config** for details and caveats.
60
+
61
+
| Plugin | Per-session config | Notes |
62
+
| ------ | :----------------: | ----- |
63
+
|[`after-hours`](./after-hours)| ✅ Supported | All fields per session; takes effect on next message. |
64
+
|[`chat-flow`](./chat-flow)| ✅ Supported | All fields per session; flow state is per `(session, chat)`. |
65
+
|[`chatwoot-adapter`](./chatwoot-adapter)| ✅ Supported | All fields per session — first-class multi-tenant shape. |
66
+
|[`faq-bot`](./faq-bot)| ✅ Supported | All fields per session (different rule sets per number). |
67
+
|[`group-translate`](./group-translate)| ⚠️ Supported, with caveat | Config-signature caching; multi-backend isolation needs one instance per session. |
68
+
|[`gsheets-logger`](./gsheets-logger)| ❌ Not supported | Single-buffer single-sink design; use one instance per session. |
69
+
|[`http-action`](./http-action)| ✅ Supported | All fields per session (different endpoints/action sets). |
70
+
|[`supabase-otp-hook`](./supabase-otp-hook)| ✅ Supported | All fields per session; applies to the instance's bound session. |
71
+
|[`typebot-connector`](./typebot-connector)| ✅ Supported | All fields per session; flow state is per `(session, chat)`. |
72
+
|[`voice-transcription`](./voice-transcription)| ⚠️ Supported, with caveat | Config-signature caching; multi-backend isolation needs one instance per session. |
73
+
53
74
**On the roadmap:** an automatic closing-greeting plugin for new leads. Want something else? [Open an issue](https://github.com/rmyndharis/OpenWA-plugins/issues) or [contribute one](#contributing).
Copy file name to clipboardExpand all lines: supabase-otp-hook/README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,15 @@ Session scope (which session sends) is also set at instance mint time, not in th
131
131
-**Supabase** — HTTP Send SMS hook with Standard Webhooks signing. SQL (Postgres function) hook variant not supported.
132
132
-**WhatsApp** — may rate-limit or require an approved business template for business-initiated messages. Adjust `messageTemplate` to match your approved wording.
133
133
134
+
### Per-session config
135
+
136
+
**Supported.** Every config field (`appName`, `messageTemplate`, `fallbackSessionId`, `debug`) may be
137
+
overridden per WhatsApp session via the dashboard; an override takes effect on the next delivery (config
138
+
is re-read per delivery). For example, two sessions can brand the OTP message differently. Note: this
139
+
plugin's inbound channel is the Supabase webhook (not a WhatsApp message), so a per-session override
140
+
applies to the session the instance is bound to (`sessionScope`) — bind each instance to a session, or
141
+
set `fallbackSessionId`.
142
+
134
143
## Security
135
144
136
145
- Webhook secret stored as the instance secret (masked on dashboard reads after mint).
0 commit comments