@@ -98,14 +98,15 @@ final class ForumTopic(env: Env) extends LilaController(env) with ForumControlle
9898 val slug = problemReportSlug(me.userId)
9999 bindForm(env.forum.forms.diagnostic)(
100100 err => jsonFormError(err),
101- text =>
101+ data =>
102102 env.forum.topicRepo
103103 .existsByTree(diagnosticId, slug)
104104 .flatMap:
105- if _ then showDiagnostic(slug, text)
105+ if _ then showDiagnostic(slug, data. text, ~ data.plaintext )
106106 else
107107 FoundPage (env.forum.categRepo.byId(diagnosticId)): categ =>
108- views.forum.topic.makeDiagnostic(categ, forms.topic(false ), anyCaptcha, text)
108+ views.forum.topic
109+ .makeDiagnostic(categ, forms.topic(false ), anyCaptcha, data.text, ~ data.plaintext)
109110 )
110111 }
111112
@@ -114,7 +115,7 @@ final class ForumTopic(env: Env) extends LilaController(env) with ForumControlle
114115 else env.forum.topicApi.removeTopic(diagnosticId, slug).inject(Redirect (routes.ForumCateg .index))
115116 }
116117
117- private def showDiagnostic (slug : ForumTopicSlug , formText : String )(using Context , Me ) =
118+ private def showDiagnostic (slug : ForumTopicSlug , formText : String , plaintext : Boolean )(using Context , Me ) =
118119 FoundPage (topicApi.showLastPage(diagnosticId, slug)): (categ, topic, posts) =>
119120 val form = forms.postWithCaptcha(false ).some
120- views.forum.topic.show(categ, topic, posts, form, None , true , formText.some)
121+ views.forum.topic.show(categ, topic, posts, form, None , true , formText.some, plaintext = plaintext )
0 commit comments