Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(plugins): say a per-session config override is deep-merged

Yudhi Armyndharis8307a74711dd
diff --git a/src/core/plugins/plugin-lifecycle.ts b/src/core/plugins/plugin-lifecycle.ts
index 5b8b9d250..8e4f616d0 100644
--- a/src/core/plugins/plugin-lifecycle.ts
+++ b/src/core/plugins/plugin-lifecycle.ts
@@ -255,9 +255,10 @@ export class PluginLifecycle {
/**
* Set (or clear) a plugin's per-session config override for `sessionId`. Hooks for that session then
- * see the override shallow-merged over the base via ctx.config — applied on the next event
- * (resolution reads plugin.sessionConfig live) and persisted across restart. An empty override
- * removes it (the session falls back to the base). Global plugins have no per-session config.
+ * see the override deep-merged over the base via ctx.config (nested objects merge key by key; arrays
+ * and scalars replace), applied on the next event (resolution reads plugin.sessionConfig live) and
+ * persisted across restart. An empty override removes it (the session falls back to the base).
+ * Global plugins have no per-session config.
*/
setPluginSessionConfig(pluginId: string, sessionId: string, config: Record<string, unknown>): PluginInstance {
const plugin = this.plugins.get(pluginId);