Add replies, private notes, get many threads (#572)

* Add replies, private notes, get many threads

* register multiple route

* filter out moderators in threads
This commit is contained in:
Geometrically
2023-04-13 15:04:08 -07:00
committed by GitHub
parent 0dfebbad9d
commit 969eb67217
5 changed files with 317 additions and 48 deletions

View File

@@ -184,7 +184,7 @@ pub struct NotificationId(pub i64);
#[sqlx(transparent)]
pub struct NotificationActionId(pub i32);
#[derive(Copy, Clone, Debug, Type, Deserialize)]
#[derive(Copy, Clone, Debug, Type, Deserialize, Eq, PartialEq)]
#[sqlx(transparent)]
pub struct ThreadId(pub i64);
#[derive(Copy, Clone, Debug, Type, Deserialize)]

View File

@@ -9,6 +9,7 @@ pub struct ThreadBuilder {
pub members: Vec<UserId>,
}
#[derive(Clone)]
pub struct Thread {
pub id: ThreadId,
pub type_: ThreadType,
@@ -23,7 +24,7 @@ pub struct ThreadMessageBuilder {
pub show_in_mod_inbox: bool,
}
#[derive(Deserialize)]
#[derive(Deserialize, Clone)]
pub struct ThreadMessage {
pub id: ThreadMessageId,
pub thread_id: ThreadId,