mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 15:40:18 +00:00
fix: prevent duplicate WASM channel activation on startup (#390)
Register boot-loaded WASM channel names with the extension manager via set_active_channels() before set_channel_runtime() so the dedup guard in activate_wasm_channel() is armed before the activation path becomes available. This fixes 409 Conflict errors from the Telegram API caused by two concurrent getUpdates polling loops. Also fix pre-existing clippy warning in signal.rs test. Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
bf35b59222
commit
e8eb4ca0bd
@@ -2742,7 +2742,7 @@ mod tests {
|
||||
let ctx = ch.conversation_context(&metadata);
|
||||
assert_eq!(ctx.get("sender"), Some(&"+1234567890".to_string()));
|
||||
assert_eq!(ctx.get("sender_uuid"), Some(&"uuid-123".to_string()));
|
||||
assert!(ctx.get("group").is_none());
|
||||
assert!(!ctx.contains_key("group"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -602,6 +602,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
if let Some(ref ext_mgr) = components.extension_manager
|
||||
&& let Some((rt, ps, router)) = wasm_channel_runtime_state.take()
|
||||
{
|
||||
ext_mgr.set_active_channels(loaded_wasm_channel_names).await;
|
||||
ext_mgr
|
||||
.set_channel_runtime(
|
||||
Arc::clone(&channels),
|
||||
|
||||
Reference in New Issue
Block a user