Private
Public Access
1
0

daemon: maintain outgoing message reference so model is consistent

This commit is contained in:
2025-05-03 21:45:53 -07:00
parent 0d61b6f2d7
commit d843127c6d
8 changed files with 124 additions and 35 deletions

View File

@@ -1,5 +1,6 @@
use serde::Serialize;
use super::conversation::ConversationID;
use chrono::NaiveDateTime;
use uuid::Uuid;
#[derive(Debug, Clone, Serialize)]
@@ -7,6 +8,9 @@ pub struct OutgoingMessage {
#[serde(skip)]
pub guid: Uuid,
#[serde(skip)]
pub date: NaiveDateTime,
#[serde(rename = "body")]
pub text: String,
@@ -62,6 +66,7 @@ impl OutgoingMessageBuilder {
text: self.text.unwrap(),
conversation_id: self.conversation_id.unwrap(),
file_transfer_guids: self.file_transfer_guids.unwrap_or_default(),
date: chrono::Utc::now().naive_utc(),
}
}
}