FEATURE: bypass topic bump when disable_category_edit_notifications is enabled (#14754)

This commit is contained in:
Jean
2021-10-27 17:05:10 -04:00
committed by GitHub
parent 5a851dec0e
commit 92f4cdd330
2 changed files with 35 additions and 1 deletions

View File

@ -387,8 +387,11 @@ class TopicsController < ApplicationController
success = true
if changes.length > 0
bypass_bump = changes[:category_id].present? && SiteSetting.disable_category_edit_notifications
first_post = topic.ordered_posts.first
success = PostRevisor.new(first_post, topic).revise!(current_user, changes, validate_post: false)
success = PostRevisor.new(first_post, topic).revise!(current_user, changes, validate_post: false, bypass_bump: bypass_bump)
if !success && topic.errors.blank?
topic.errors.add(:base, :unable_to_update)