FEATURE: Notify flaggers when flagged post is edited by author

This commit is contained in:
Gerhard Schlager
2018-04-06 23:37:29 +02:00
parent 0e9ec237a2
commit 62aacce8f4
3 changed files with 60 additions and 0 deletions

View File

@@ -109,4 +109,17 @@ class PostActionNotifier
)
end
def self.after_post_unhide(post, flaggers)
return if @disabled || post.last_editor.blank? || flaggers.blank?
flaggers.each do |flagger|
alerter.create_notification(
flagger,
Notification.types[:edited],
post,
display_username: post.last_editor.username,
acting_user_id: post.last_editor.id
)
end
end
end