mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 05:50:20 +00:00
fix(telegram): address PR review comments
- Export pickFirstExistingAgentId and use it to validate topic agentId - Properly update mainSessionKey when overriding route agent - Fix docs example showing incorrect session key for topic 3 Fixes issue where non-existent agentId would create orphaned sessions. Fixes issue where DM topic replies would route to wrong agent.
This commit is contained in:
committed by
Ayaan Zaidi
parent
58bc9a241b
commit
8eeb049683
@@ -143,7 +143,7 @@ function resolveAgentLookupCache(cfg: OpenClawConfig): AgentLookupCache {
|
||||
return next;
|
||||
}
|
||||
|
||||
function pickFirstExistingAgentId(cfg: OpenClawConfig, agentId: string): string {
|
||||
export function pickFirstExistingAgentId(cfg: OpenClawConfig, agentId: string): string {
|
||||
const lookup = resolveAgentLookupCache(cfg);
|
||||
const trimmed = (agentId ?? "").trim();
|
||||
if (!trimmed) {
|
||||
|
||||
Reference in New Issue
Block a user