Pass the event name to web controllerConnectionEvent handlers (#1085)

The web interface registered the hook's listener directly on the
connector, so handlers got the connector's emit arguments (the hello
data for connect, nothing for the rest) instead of the event name.

Fixes #1083

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BastiaanandClaude Opus 5.5 authored and GitHub committed 2026-10-15 09:56:09 +01:00
1 parent e0755cb4ee
commit 6f6795dc1f
1 file changed
+1 -1
+1 -1
View File
@@ -106,7 +106,7 @@ export class Control extends lib.Link {
});
for (let event of ["connect", "drop", "resume", "close"] as const) {
this.connector.on(event, this.hooks.controllerConnectionEvent.listener);
this.connector.on(event, () => this.hooks.controllerConnectionEvent.invoke(event));
}
this.handle(lib.AccountUpdateEvent, this.handleAccountUpdateEvent.bind(this));