(channel: ClosableLarkChannel)
| 20 | * handshake cannot keep reconnecting in the background. |
| 21 | */ |
| 22 | export async function closeLarkChannel(channel: ClosableLarkChannel): Promise<void> { |
| 23 | try { |
| 24 | channel.rawWsClient?.close({ force: true }); |
| 25 | } catch { |
| 26 | // Best effort: the public disconnect path still disposes channel state. |
| 27 | } |
| 28 | await channel.disconnect().catch(() => {}); |
| 29 | } |
| 30 | |
| 31 | export function feishuMessageToEvent( |
| 32 | message: NormalizedMessage, |
no test coverage detected