diff --git a/internal/app/comment_test.go b/internal/app/comment_test.go index 035515e..b3f47e1 100644 --- a/internal/app/comment_test.go +++ b/internal/app/comment_test.go @@ -124,7 +124,7 @@ func assertFeedCommentWrite(t *testing.T, pds *testPDS, subject tangled.ListItem if record.Subject == nil || record.Subject.Uri != subject.URI || record.Subject.Cid != subject.CID { t.Errorf("record subject = %+v, want URI %q and CID %q", record.Subject, subject.URI, subject.CID) } - if record.Body == nil || record.Body.MarkupMarkdown == nil || record.Body.MarkupMarkdown.Text != body { + if record.Body == nil || record.Body.MarkupMarkdown == nil || record.Body.MarkupMarkdown.Text != body || record.Body.MarkupMarkdown.Original == nil || *record.Body.MarkupMarkdown.Original != body { t.Errorf("record body = %+v, want markdown %q", record.Body, body) } if !sameRoundIndex(record.PullRoundIdx, pullRoundIdx) { diff --git a/internal/app/feed_comment.go b/internal/app/feed_comment.go index 71fa123..afae68a 100644 --- a/internal/app/feed_comment.go +++ b/internal/app/feed_comment.go @@ -30,7 +30,7 @@ func (s *Service) createFeedComment(ctx context.Context, subjectItem tangled.Lis Record: tangledlex.FeedComment{ LexiconTypeID: tangled.FeedCommentCollection, Subject: subject, - Body: &tangledlex.FeedComment_Body{MarkupMarkdown: &tangledlex.MarkupMarkdown{Text: body}}, + Body: &tangledlex.FeedComment_Body{MarkupMarkdown: &tangledlex.MarkupMarkdown{Text: body, Original: &body}}, CreatedAt: time.Now().UTC().Format(time.RFC3339), PullRoundIdx: pullRoundIdx, },