mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: don't trigger notifications when changing category/tags of unlisted topics (#7323)
This commit is contained in:
@@ -5,7 +5,7 @@ module Jobs
|
||||
def execute(args)
|
||||
post = Post.find_by(id: args[:post_id])
|
||||
|
||||
if post&.topic
|
||||
if post&.topic&.visible?
|
||||
post_alerter = PostAlerter.new
|
||||
post_alerter.notify_post_users(post, User.where(id: args[:notified_user_ids]))
|
||||
post_alerter.notify_first_post_watchers(post, post_alerter.category_watchers(post.topic))
|
||||
|
||||
@@ -5,7 +5,7 @@ module Jobs
|
||||
def execute(args)
|
||||
post = Post.find_by(id: args[:post_id])
|
||||
|
||||
if post&.topic
|
||||
if post&.topic&.visible?
|
||||
post_alerter = PostAlerter.new
|
||||
post_alerter.notify_post_users(post, User.where(id: args[:notified_user_ids]))
|
||||
post_alerter.notify_first_post_watchers(post, post_alerter.tag_watchers(post.topic))
|
||||
|
||||
Reference in New Issue
Block a user