Implement support for replies
This commit is contained in:
@@ -14,6 +14,7 @@ const commentsConfigSchema = z.object({
|
||||
type: z.string(), // fixme : in validation
|
||||
template: z.string(),
|
||||
idPrefix: z.string(),
|
||||
replyPrefix: z.string(),
|
||||
}),
|
||||
}),
|
||||
dirs: z.object({
|
||||
@@ -30,6 +31,7 @@ export const castCommentsConfig = (what: unknown): CommentsConfig => {
|
||||
|
||||
export type Message = {
|
||||
id: string,
|
||||
idHash: string,
|
||||
date: Date,
|
||||
recipients: string[],
|
||||
from: {
|
||||
@@ -42,6 +44,7 @@ export type Message = {
|
||||
mailbox: string,
|
||||
modseq: BigInt,
|
||||
thread?: string,
|
||||
replyToHash?: string,
|
||||
}
|
||||
|
||||
export type ThreadUser = {
|
||||
@@ -51,11 +54,15 @@ export type ThreadUser = {
|
||||
}
|
||||
|
||||
export type ThreadComment = {
|
||||
idHash: string,
|
||||
replyToHash?: string,
|
||||
replyAddress: string,
|
||||
user: ThreadUser,
|
||||
date: Date,
|
||||
subject: string,
|
||||
text: string,
|
||||
rendered: string,
|
||||
replies?: ThreadComment[],
|
||||
}
|
||||
|
||||
export type ThreadData = {
|
||||
|
||||
Reference in New Issue
Block a user