From 2df893f6f363683faba0461d2c27b4380d5bdeaa Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 30 Dec 2023 17:17:19 +0200 Subject: [PATCH] fix breakage of polls --- front/post.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front/post.go b/front/post.go index e4870405..13ad6b8b 100644 --- a/front/post.go +++ b/front/post.go @@ -131,10 +131,6 @@ func post(w text.Writer, r *request, inReplyTo *ap.Object, to ap.Audience, cc ap hash := sha256.Sum256([]byte(postID)) - if inReplyTo == nil || inReplyTo.Type != ap.QuestionObject { - content = plain.ToHTML(content) - } - note := ap.Object{ Type: ap.NoteObject, ID: postID, @@ -198,6 +194,10 @@ func post(w text.Writer, r *request, inReplyTo *ap.Object, to ap.Audience, cc ap note.EndTime = &endTime } + if inReplyTo == nil || inReplyTo.Type != ap.QuestionObject { + note.Content = plain.ToHTML(note.Content) + } + if err := outbox.Create(r.Context, r.Log, r.DB, ¬e, r.User); err != nil { r.Log.Error("Failed to insert post", "error", err) if errors.Is(err, outbox.ErrDeliveryQueueFull) {