use faker_rand::lorem::Paragraphs; use crate::{ app::App, clock::RequestedAt, conversation::Conversation, message::{self, Body, Message}, user::User, }; pub async fn send( app: &App, conversation: &Conversation, sender: &User, sent_at: &RequestedAt, ) -> Message { let body = propose(); app.messages() .send(&conversation.id, sender, sent_at, &body) .await .expect("should succeed if the conversation exists") } pub fn propose() -> Body { rand::random::().to_string().into() } pub fn fictitious() -> message::Id { message::Id::generate() }