Files
openclaw/scripts
IVY 5adf9d2619 fix(discord): prevent identify race (#68159)
Verified against Carbon 0.16.0 source:
- Client constructor calls plugin.registerClient(this) without awaiting it.
- GatewayPlugin.registerClient publishes client before its awaited metadata fetch.
- identify() silently returns when client is missing.

This patch matches Carbon's ordering in OpenClaw's subclass, avoids a second super.registerClient call if lifecycle connect already opened the socket during metadata loading, and keeps regression coverage for both ws and isConnecting cases.

Local proof:
- pnpm test extensions/discord/src/monitor/provider.proxy.test.ts extensions/discord/src/monitor/gateway-plugin.test.ts
- pnpm lint:tmp:no-raw-channel-fetch
- pnpm check:changed
- pnpm check
- pnpm test

GitHub checks green for 72547825e1.
2026-04-24 22:39:44 +01:00
..
2026-01-30 03:16:21 +01:00
2026-04-20 15:48:20 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-04-08 00:09:07 +01:00
2026-04-10 20:56:43 +01:00
2026-04-06 19:52:42 +01:00
2026-01-30 03:16:21 +01:00
2026-04-23 18:09:20 +01:00
2026-04-23 18:09:20 +01:00
2026-01-30 03:16:21 +01:00