Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol diffdown.com

Add EmbeddedComment type and Comments field to Document

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+12 -2
+12 -2
internal/model/models.go
··· 34 34 Title string `json:"title"` 35 35 Content *MarkdownContent `json:"content,omitempty"` 36 36 TextContent string `json:"textContent,omitempty"` 37 - Collaborators []string `json:"collaborators,omitempty"` 38 - CreatedAt string `json:"createdAt"` 37 + Collaborators []string `json:"collaborators,omitempty"` 38 + Comments []EmbeddedComment `json:"comments,omitempty"` 39 + CreatedAt string `json:"createdAt"` 39 40 UpdatedAt string `json:"updatedAt,omitempty"` 40 41 } 41 42 ··· 47 48 48 49 type MarkdownText struct { 49 50 RawMarkdown string `json:"rawMarkdown"` 51 + } 52 + 53 + type EmbeddedComment struct { 54 + ID string `json:"id"` // random 8-char hex for dedup 55 + ParagraphID string `json:"paragraphId"` // "p-0", "p-1", ... or "general" 56 + Text string `json:"text"` 57 + Author string `json:"author"` // DID 58 + AuthorHandle string `json:"authorHandle"` // resolved handle, may be empty 59 + CreatedAt string `json:"createdAt"` // RFC3339 50 60 } 51 61 52 62 type Invite struct {