Skip to content

Commit 39dfad4

Browse files
committed
Send server-peer registrations upstream
1 parent 281b28d commit 39dfad4

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

go/modcdp/injector/extension.zip

48 Bytes
Binary file not shown.

js/src/client/ModCDPClient.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,12 @@ export class ModCDPClient<
394394

395395
async send(method: string, params: unknown = {}, session_id: string | null = null): Promise<Record<string, unknown>> {
396396
const started_at = Date.now();
397-
const prepared = this.types.prepareCommand(
398-
method,
399-
params,
400-
method === "Mod.addCustomCommand" ||
397+
const can_register_locally =
398+
!this.upstream.upstream_is_modcdp_server &&
399+
(method === "Mod.addCustomCommand" ||
401400
(method === "Mod.addCustomEvent" && !this.injector?.session_id) ||
402-
(method === "Mod.addMiddleware" && !this.injector?.session_id),
403-
);
401+
(method === "Mod.addMiddleware" && !this.injector?.session_id));
402+
const prepared = this.types.prepareCommand(method, params, can_register_locally);
404403
const command_params = prepared.params;
405404
if (prepared.custom_command_name) {
406405
this.types.installCustomCommandAlias(this, prepared.custom_command_name, (alias_method, alias_params) =>

python/modcdp/extension.zip

48 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)