X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapi_common%2Fsrc%2Fperson.rs;h=8c4131dd64fcfd085c2d10afaaa70203135c5823;hb=004efd5d94da0eee2a51f8c88a441c0c4afe3871;hp=79e3041d8e8c8ab8ca0147b2bb52b6ae0eab442e;hpb=09246a20fb4c1ba82fd2a34bd9b0b54e0eb6575f;p=lemmy.git diff --git a/crates/api_common/src/person.rs b/crates/api_common/src/person.rs index 79e3041d..8c4131dd 100644 --- a/crates/api_common/src/person.rs +++ b/crates/api_common/src/person.rs @@ -1,5 +1,10 @@ use crate::sensitive::Sensitive; -use lemmy_db_views::structs::{CommentView, PostView, PrivateMessageView}; +use lemmy_db_schema::{ + newtypes::{CommentReplyId, CommunityId, LanguageId, PersonId, PersonMentionId}, + CommentSortType, + SortType, +}; +use lemmy_db_views::structs::{CommentView, PostView}; use lemmy_db_views_actor::structs::{ CommentReplyView, CommunityModeratorView, @@ -13,18 +18,6 @@ pub struct Login { pub username_or_email: Sensitive, pub password: Sensitive, } -use lemmy_db_schema::{ - newtypes::{ - CommentReplyId, - CommunityId, - LanguageId, - PersonId, - PersonMentionId, - PrivateMessageId, - }, - CommentSortType, - SortType, -}; #[derive(Debug, Serialize, Deserialize, Clone, Default)] pub struct Register { @@ -249,52 +242,6 @@ pub struct PasswordChangeAfterReset { pub password_verify: Sensitive, } -#[derive(Debug, Serialize, Deserialize, Clone, Default)] -pub struct CreatePrivateMessage { - pub content: String, - pub recipient_id: PersonId, - pub auth: Sensitive, -} - -#[derive(Debug, Serialize, Deserialize, Clone, Default)] -pub struct EditPrivateMessage { - pub private_message_id: PrivateMessageId, - pub content: String, - pub auth: Sensitive, -} - -#[derive(Debug, Serialize, Deserialize, Clone, Default)] -pub struct DeletePrivateMessage { - pub private_message_id: PrivateMessageId, - pub deleted: bool, - pub auth: Sensitive, -} - -#[derive(Debug, Serialize, Deserialize, Clone, Default)] -pub struct MarkPrivateMessageAsRead { - pub private_message_id: PrivateMessageId, - pub read: bool, - pub auth: Sensitive, -} - -#[derive(Debug, Serialize, Deserialize, Clone, Default)] -pub struct GetPrivateMessages { - pub unread_only: Option, - pub page: Option, - pub limit: Option, - pub auth: Sensitive, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct PrivateMessagesResponse { - pub private_messages: Vec, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct PrivateMessageResponse { - pub private_message_view: PrivateMessageView, -} - #[derive(Debug, Serialize, Deserialize, Clone, Default)] pub struct GetReportCount { pub community_id: Option, @@ -306,6 +253,7 @@ pub struct GetReportCountResponse { pub community_id: Option, pub comment_reports: i64, pub post_reports: i64, + pub private_message_reports: Option, } #[derive(Debug, Serialize, Deserialize, Clone, Default)]