//! # New conversation message //! //! @author Pierre Hubert use crate::data::user::UserID; use crate::data::conversation::ConvID; use crate::data::conversation_message::{ConversationMessageFile, ConversationServerMessageType}; /// Information about a new conversation message pub struct NewConversationMessage { pub user_id: Option, pub conv_id: ConvID, pub message: Option, pub file: Option, pub server_message: Option, } impl NewConversationMessage { /// Create a new server message pub fn new_server_message(conv_id: ConvID, message: ConversationServerMessageType) -> Self { Self { user_id: None, conv_id, message: None, file: None, server_message: Some(message), } } }