fix(openclaw): stop stale listeners during initialization

This commit is contained in:
GeonWoo Jeon (Jay)
2026-04-07 22:49:37 +09:00
parent ed4617ec84
commit 20ee955030
+8 -2
View File
@@ -132,10 +132,16 @@ export async function wakeOpenClaw(
}
export async function initializeOpenClaw(config: OpenClawConfig): Promise<void> {
const replyListener = config.replyListener
if (config.enabled && (replyListener?.discordBotToken || replyListener?.telegramBotToken)) {
const hasReplyListenerCredentials = Boolean(
config.replyListener?.discordBotToken || config.replyListener?.telegramBotToken,
)
if (config.enabled && hasReplyListenerCredentials) {
await startReplyListener(config)
return
}
await stopReplyListener()
}
export { startReplyListener, stopReplyListener }