init
This commit is contained in:
@@ -8,8 +8,16 @@ use sea_orm::Set;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub fn message_model_to_message_response(model: message::Model) -> MessageResponse {
|
||||
message_model_to_message_response_with_server_id(model, None)
|
||||
}
|
||||
|
||||
pub fn message_model_to_message_response_with_server_id(
|
||||
model: message::Model,
|
||||
server_id: Option<Uuid>,
|
||||
) -> MessageResponse {
|
||||
MessageResponse {
|
||||
id: model.id,
|
||||
server_id,
|
||||
channel_id: model.channel_id,
|
||||
user_id: model.user_id,
|
||||
content: model.content,
|
||||
|
||||
Reference in New Issue
Block a user