fix(channels): enforce reply_target naming consistency
This commit is contained in:
parent
a7a580a479
commit
cad7fb8f22
3 changed files with 74 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ pub struct ChannelMessage {
|
|||
pub id: String,
|
||||
pub sender: String,
|
||||
/// Channel-specific reply address (e.g. Telegram chat_id, Discord channel_id).
|
||||
pub reply_to: String,
|
||||
pub reply_target: String,
|
||||
pub content: String,
|
||||
pub channel: String,
|
||||
pub timestamp: u64,
|
||||
|
|
@ -97,7 +97,7 @@ impl Channel for TelegramChannel {
|
|||
let channel_msg = ChannelMessage {
|
||||
id: msg["message_id"].to_string(),
|
||||
sender,
|
||||
reply_to: chat_id,
|
||||
reply_target: chat_id,
|
||||
content: msg["text"].as_str().unwrap_or("").to_string(),
|
||||
channel: "telegram".into(),
|
||||
timestamp: msg["date"].as_u64().unwrap_or(0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue