+ // Update the Content
+ let content = data
+ .content
+ .as_ref()
+ .map(|c| remove_slurs(c, &local_site_to_slur_regex(&local_site)));
+ is_valid_body_field(&content, false)?;
+ let content = sanitize_html_opt(&content);
+
+ let comment_id = data.comment_id;
+ let form = CommentUpdateForm::builder()
+ .content(content)
+ .language_id(data.language_id)
+ .updated(Some(Some(naive_now())))
+ .build();
+ let updated_comment = Comment::update(&mut context.pool(), comment_id, &form)
+ .await
+ .with_lemmy_type(LemmyErrorType::CouldntUpdateComment)?;
+