fix(channels): add reply_to field to ChannelMessage for correct reply routing
ChannelMessage.sender was used both for display (username) and as the reply target in Channel::send(). For Telegram, sender is the username (e.g. "unknown") while send() requires the numeric chat_id, causing "Bad Request: chat not found" errors. Add a dedicated reply_to field to ChannelMessage that stores the channel-specific reply address (Telegram chat_id, Discord channel_id, Slack channel, etc.). Update all channel implementations and dispatch code to use reply_to for send/start_typing/stop_typing calls. This also fixes the same latent bug in Discord and Slack channels where sender (user ID) was incorrectly passed as the reply target.
This commit is contained in:
parent
e21285f453
commit
18952f9a2b
15 changed files with 42 additions and 10 deletions
|
|
@ -598,6 +598,7 @@ Allowlist Telegram @username or numeric user ID, then run `zeroclaw onboard --ch
|
|||
let msg = ChannelMessage {
|
||||
id: format!("telegram_{chat_id}_{message_id}"),
|
||||
sender: username.to_string(),
|
||||
reply_to: chat_id.clone(),
|
||||
content: text.to_string(),
|
||||
channel: "telegram".to_string(),
|
||||
timestamp: std::time::SystemTime::now()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue