fix(build): restore ChannelMessage reply_target usage (#541)
This commit is contained in:
parent
7ebc98d8d0
commit
a2f29838b4
4 changed files with 5 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ impl Channel for CliChannel {
|
||||||
let msg = ChannelMessage {
|
let msg = ChannelMessage {
|
||||||
id: Uuid::new_v4().to_string(),
|
id: Uuid::new_v4().to_string(),
|
||||||
sender: "user".to_string(),
|
sender: "user".to_string(),
|
||||||
reply_to: "user".to_string(),
|
reply_target: "user".to_string(),
|
||||||
content: line,
|
content: line,
|
||||||
channel: "cli".to_string(),
|
channel: "cli".to_string(),
|
||||||
timestamp: std::time::SystemTime::now()
|
timestamp: std::time::SystemTime::now()
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ impl Channel for DingTalkChannel {
|
||||||
let channel_msg = ChannelMessage {
|
let channel_msg = ChannelMessage {
|
||||||
id: Uuid::new_v4().to_string(),
|
id: Uuid::new_v4().to_string(),
|
||||||
sender: sender_id.to_string(),
|
sender: sender_id.to_string(),
|
||||||
reply_to: chat_id,
|
reply_target: chat_id,
|
||||||
content: content.to_string(),
|
content: content.to_string(),
|
||||||
channel: "dingtalk".to_string(),
|
channel: "dingtalk".to_string(),
|
||||||
timestamp: std::time::SystemTime::now()
|
timestamp: std::time::SystemTime::now()
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@ impl LarkChannel {
|
||||||
let channel_msg = ChannelMessage {
|
let channel_msg = ChannelMessage {
|
||||||
id: Uuid::new_v4().to_string(),
|
id: Uuid::new_v4().to_string(),
|
||||||
sender: lark_msg.chat_id.clone(),
|
sender: lark_msg.chat_id.clone(),
|
||||||
reply_to: lark_msg.chat_id.clone(),
|
reply_target: lark_msg.chat_id.clone(),
|
||||||
content: text,
|
content: text,
|
||||||
channel: "lark".to_string(),
|
channel: "lark".to_string(),
|
||||||
timestamp: std::time::SystemTime::now()
|
timestamp: std::time::SystemTime::now()
|
||||||
|
|
|
||||||
|
|
@ -709,7 +709,7 @@ async fn handle_whatsapp_message(
|
||||||
{
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
// Send reply via WhatsApp
|
// Send reply via WhatsApp
|
||||||
if let Err(e) = wa.send(&response, &msg.reply_to).await {
|
if let Err(e) = wa.send(&response, &msg.reply_target).await {
|
||||||
tracing::error!("Failed to send WhatsApp reply: {e}");
|
tracing::error!("Failed to send WhatsApp reply: {e}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -718,7 +718,7 @@ async fn handle_whatsapp_message(
|
||||||
let _ = wa
|
let _ = wa
|
||||||
.send(
|
.send(
|
||||||
"Sorry, I couldn't process your message right now.",
|
"Sorry, I couldn't process your message right now.",
|
||||||
&msg.reply_to,
|
&msg.reply_target,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue