fix(openclaw): stop stale listeners during initialization
This commit is contained in:
@@ -132,10 +132,16 @@ export async function wakeOpenClaw(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initializeOpenClaw(config: OpenClawConfig): Promise<void> {
|
export async function initializeOpenClaw(config: OpenClawConfig): Promise<void> {
|
||||||
const replyListener = config.replyListener
|
const hasReplyListenerCredentials = Boolean(
|
||||||
if (config.enabled && (replyListener?.discordBotToken || replyListener?.telegramBotToken)) {
|
config.replyListener?.discordBotToken || config.replyListener?.telegramBotToken,
|
||||||
|
)
|
||||||
|
|
||||||
|
if (config.enabled && hasReplyListenerCredentials) {
|
||||||
await startReplyListener(config)
|
await startReplyListener(config)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await stopReplyListener()
|
||||||
}
|
}
|
||||||
|
|
||||||
export { startReplyListener, stopReplyListener }
|
export { startReplyListener, stopReplyListener }
|
||||||
|
|||||||
Reference in New Issue
Block a user