fix(discord): use channel name for reply routing instead of discord channel ID

The Discord channel was setting msg.channel to the numeric Discord
channel ID instead of the literal string 'discord'. This caused
process_channel_message() to fail the channels_by_name lookup since
the map is keyed by channel name (e.g. 'discord', 'telegram', 'slack').

The result: the bot receives messages and generates LLM responses but
never sends them back -- target_channel resolves to None so the send
call is silently skipped.

Every other channel (telegram, slack, whatsapp, matrix, signal, irc,
imessage, lark, dingtalk, qq, email, mattermost) correctly sets this
field to its channel name string. Discord was the only one using the
platform-specific ID.
This commit is contained in:
h1n054ur 2026-02-18 02:52:35 +05:00 committed by Chummy
parent 4f9c87ff74
commit 1c074d5204

View file

@ -406,7 +406,7 @@ impl Channel for DiscordChannel {
channel_id.clone()
},
content: clean_content,
channel: channel_id,
channel: "discord".to_string(),
timestamp: std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap_or_default()