From 410371870f219b7a498c4e10ade6eeb0f7222a7e Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 13 Oct 2026 02:17:21 +0900 Subject: [PATCH] 1.0.6 RC6 --- controller.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controller.ts b/controller.ts index c4e8980..224ba99 100644 --- a/controller.ts +++ b/controller.ts @@ -251,9 +251,10 @@ export default async function(context: ControllerPluginContext) { return true; }; + /** Config is keyed by instance name; sendTo wants the controller's numeric ID. */ const findInstanceId = (instanceName: string): number | null => { - for (const [id, instance] of controller.instances) { - if (instance.name === instanceName) return id; + for (const instance of controller.instances.values()) { + if (instance.config.get('instance.name') === instanceName) return instance.id; } return null;