+8
-8
internal/core/comments/comment.go
···
+376
-4
internal/core/comments/comment_service.go
······+// Used to allow injection of different auth mechanisms (OAuth for production, password for tests).+type PDSClientFactory func(ctx context.Context, session *oauth.ClientSessionData) (pds.Client, error)···+CreateComment(ctx context.Context, session *oauth.ClientSessionData, req CreateCommentRequest) (*CreateCommentResponse, error)+UpdateComment(ctx context.Context, session *oauth.ClientSessionData, req UpdateCommentRequest) (*UpdateCommentResponse, error)+DeleteComment(ctx context.Context, session *oauth.ClientSessionData, req DeleteCommentRequest) error······+// NewCommentServiceWithPDSFactory creates a comment service with a custom PDS client factory.···+// Otherwise, uses DPoP authentication via indigo's APIClient for proper OAuth token handling.+func (s *commentService) getPDSClient(ctx context.Context, session *oauth.ClientSessionData) (pds.Client, error) {+func (s *commentService) CreateComment(ctx context.Context, session *oauth.ClientSessionData, req CreateCommentRequest) (*CreateCommentResponse, error) {+func (s *commentService) UpdateComment(ctx context.Context, session *oauth.ClientSessionData, req UpdateCommentRequest) (*UpdateCommentResponse, error) {+// TODO: Use PutRecord instead of CreateRecord for proper update semantics with optimistic locking.+// PutRecord should accept the existing CID (existingRecord.CID) to ensure concurrent updates are detected.+func (s *commentService) DeleteComment(ctx context.Context, session *oauth.ClientSessionData, req DeleteCommentRequest) error {
+2
-2
internal/core/comments/errors.go
···
+38
internal/core/comments/types.go
···