- // Do the update
- let content_slurs_removed =
- remove_slurs(&data.content.to_owned(), &context.settings().slur_regex());
- let comment_id = data.comment_id;
- let updated_comment = blocking(context.pool(), move |conn| {
- Comment::update_content(conn, comment_id, &content_slurs_removed)
- })
- .await?
- .map_err(|e| ApiError::err("couldnt_update_comment", e))?;
-
- // Send the apub update
- CreateOrUpdateComment::send(
- &updated_comment.clone().into(),
- &local_user_view.person.clone().into(),
- CreateOrUpdateType::Update,
- context,
+ let language_id = self.language_id;
+ CommunityLanguage::is_allowed_community_language(
+ &mut context.pool(),
+ language_id,
+ orig_comment.community.id,