Implement support for replies

This commit is contained in:
2025-01-05 19:55:54 -05:00
parent 834c23735d
commit 1f5889dc39
7 changed files with 64 additions and 9 deletions

View File

@@ -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 = {