mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Enhance post action handler events (#23027)
This commit is contained in:
@@ -54,6 +54,13 @@ class PostActionDestroyer
|
||||
GivenDailyLike.decrement_for(@destroyed_by.id)
|
||||
end
|
||||
|
||||
case @post_action_type_id
|
||||
when *PostActionType.notify_flag_type_ids
|
||||
DiscourseEvent.trigger(:flag_destroyed, post_action, self)
|
||||
when PostActionType.types[:like]
|
||||
DiscourseEvent.trigger(:like_destroyed, post_action, self)
|
||||
end
|
||||
|
||||
UserActionManager.post_action_destroyed(post_action)
|
||||
PostActionNotifier.post_action_deleted(post_action)
|
||||
result.success = true
|
||||
|
||||
Reference in New Issue
Block a user