daemon: implements post office
This commit is contained in:
@@ -93,15 +93,15 @@ impl APIInterface for TestClient {
|
||||
|
||||
async fn send_message(
|
||||
&mut self,
|
||||
outgoing_message: OutgoingMessage,
|
||||
outgoing_message: &OutgoingMessage,
|
||||
) -> Result<Message, Self::Error> {
|
||||
let message = Message::builder()
|
||||
.guid(Uuid::new_v4().to_string())
|
||||
.text(outgoing_message.text)
|
||||
.text(outgoing_message.text.clone())
|
||||
.date(OffsetDateTime::now_utc())
|
||||
.build();
|
||||
|
||||
self.messages.entry(outgoing_message.conversation_id).or_insert(vec![]).push(message.clone());
|
||||
self.messages.entry(outgoing_message.conversation_id.clone()).or_insert(vec![]).push(message.clone());
|
||||
Ok(message)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user