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> {
|
||||
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 }
|
||||
|
||||
Reference in New Issue
Block a user