fix: auto-prefix platform IDs in register.ts to match Chat SDK format
Chat SDK adapters use prefixed platform IDs (e.g. "telegram:6037840640", "discord:guildId:channelId") but users provide raw IDs during setup. Without the prefix, the router can't match the registered messaging group to incoming messages and silently drops them. register.ts now auto-prefixes with the channel type if not already present. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ Status: [x] done, [~] partial, [ ] not started
|
|||||||
- [x] Chat SDK SQLite state adapter (KV, subscriptions, locks, lists)
|
- [x] Chat SDK SQLite state adapter (KV, subscriptions, locks, lists)
|
||||||
- [x] Discord via Chat SDK
|
- [x] Discord via Chat SDK
|
||||||
- [~] Slack via Chat SDK (adapter + skill written, not tested)
|
- [~] Slack via Chat SDK (adapter + skill written, not tested)
|
||||||
- [~] Telegram via Chat SDK (adapter + skill written, not tested)
|
- [x] Telegram via Chat SDK (E2E verified: inbound, routing, typing, delivery)
|
||||||
- [~] Microsoft Teams via Chat SDK (adapter + skill written, not tested)
|
- [~] Microsoft Teams via Chat SDK (adapter + skill written, not tested)
|
||||||
- [~] Google Chat via Chat SDK (adapter + skill written, not tested)
|
- [~] Google Chat via Chat SDK (adapter + skill written, not tested)
|
||||||
- [~] Linear via Chat SDK (adapter + skill written, not tested)
|
- [~] Linear via Chat SDK (adapter + skill written, not tested)
|
||||||
|
|||||||
@@ -118,6 +118,13 @@ export async function run(args: string[]): Promise<void> {
|
|||||||
process.exit(4);
|
process.exit(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Chat SDK adapters prefix platform IDs with the channel type (e.g. "telegram:123",
|
||||||
|
// "discord:guild:channel"). Auto-prefix if the user provided a raw ID so the router
|
||||||
|
// matches the adapter's format.
|
||||||
|
if (parsed.platformId && !parsed.platformId.startsWith(`${parsed.channel}:`)) {
|
||||||
|
parsed.platformId = `${parsed.channel}:${parsed.platformId}`;
|
||||||
|
}
|
||||||
|
|
||||||
log.info('Registering channel', parsed);
|
log.info('Registering channel', parsed);
|
||||||
|
|
||||||
// Init v2 central DB
|
// Init v2 central DB
|
||||||
|
|||||||
Reference in New Issue
Block a user