mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Notify on tag change. (#7119)
This commit is contained in:
committed by
Régis Hanol
parent
e5e2fa4064
commit
c6ed86220e
@@ -83,7 +83,14 @@ class PostRevisor
|
||||
tc.check_result(false)
|
||||
next
|
||||
end
|
||||
tc.record_change('tags', prev_tags, tags) unless prev_tags.sort == tags.sort
|
||||
if prev_tags.sort != tags.sort
|
||||
tc.record_change('tags', prev_tags, tags)
|
||||
DB.after_commit do
|
||||
post = tc.topic.ordered_posts.first
|
||||
notified_user_ids = [post.user_id, post.last_editor_id].uniq
|
||||
Jobs.enqueue(:notify_tag_change, post_id: post.id, notified_user_ids: notified_user_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user