daemon: maintain outgoing message reference so model is consistent
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user