FIX: change **default** notification state when a topic is recategorized within 5 days of creation

This commit is contained in:
Régis Hanol
2015-08-19 22:40:20 +02:00
parent eafeec51a5
commit 9ae9aed010
3 changed files with 50 additions and 18 deletions

View File

@@ -482,8 +482,8 @@ class Topic < ActiveRecord::Base
Category.where(id: new_category.id).update_all("topic_count = topic_count + 1")
CategoryFeaturedTopic.feature_topics_for(old_category) unless @import_mode
CategoryFeaturedTopic.feature_topics_for(new_category) unless @import_mode || old_category.id == new_category.id
CategoryUser.auto_watch_new_topic(self)
CategoryUser.auto_track_new_topic(self)
CategoryUser.auto_watch_new_topic(self, new_category)
CategoryUser.auto_track_new_topic(self, new_category)
end
true