use crate::sensitive::Sensitive;
use lemmy_db_views::structs::{CommentView, PostView, PrivateMessageView};
-use lemmy_db_views_actor::structs::{CommunityModeratorView, PersonMentionView, PersonViewSafe};
+use lemmy_db_views_actor::structs::{
+ CommentReplyView,
+ CommunityModeratorView,
+ PersonMentionView,
+ PersonViewSafe,
+};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub password: Sensitive<String>,
}
use lemmy_db_schema::{
- newtypes::{CommunityId, PersonId, PersonMentionId, PrivateMessageId},
+ newtypes::{
+ CommentReplyId,
+ CommunityId,
+ LanguageId,
+ PersonId,
+ PersonMentionId,
+ PrivateMessageId,
+ },
+ CommentSortType,
SortType,
};
pub theme: Option<String>,
pub default_sort_type: Option<i16>,
pub default_listing_type: Option<i16>,
- pub lang: Option<String>,
+ pub interface_language: Option<String>,
pub avatar: Option<String>,
pub banner: Option<String>,
pub display_name: Option<String>,
pub show_bot_accounts: Option<bool>,
pub show_read_posts: Option<bool>,
pub show_new_post_notifs: Option<bool>,
+ pub discussion_languages: Option<Vec<LanguageId>>,
pub auth: Sensitive<String>,
}
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct GetRepliesResponse {
- pub replies: Vec<CommentView>,
+ pub replies: Vec<CommentReplyView>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct GetReplies {
- pub sort: Option<SortType>,
+ pub sort: Option<CommentSortType>,
pub page: Option<i64>,
pub limit: Option<i64>,
pub unread_only: Option<bool>,
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct GetPersonMentions {
- pub sort: Option<SortType>,
+ pub sort: Option<CommentSortType>,
pub page: Option<i64>,
pub limit: Option<i64>,
pub unread_only: Option<bool>,
pub person_mention_view: PersonMentionView,
}
+#[derive(Debug, Serialize, Deserialize, Clone, Default)]
+pub struct MarkCommentReplyAsRead {
+ pub comment_reply_id: CommentReplyId,
+ pub read: bool,
+ pub auth: Sensitive<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct CommentReplyResponse {
+ pub comment_reply_view: CommentReplyView,
+}
+
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct DeleteAccount {
pub password: Sensitive<String>,