FEATURE: New DiscourseEvent trigger for likes (#12374)
This commit is contained in:
parent
9aa510f609
commit
9737ce8c5f
|
@ -265,8 +265,13 @@ private
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if post_action && PostActionType.notify_flag_type_ids.include?(@post_action_type_id)
|
if post_action
|
||||||
DiscourseEvent.trigger(:flag_created, post_action)
|
case @post_action_type_id
|
||||||
|
when *PostActionType.notify_flag_type_ids
|
||||||
|
DiscourseEvent.trigger(:flag_created, post_action)
|
||||||
|
when PostActionType.types[:like]
|
||||||
|
DiscourseEvent.trigger(:like_created, post_action)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
GivenDailyLike.increment_for(@created_by.id) if @post_action_type_id == PostActionType.types[:like]
|
GivenDailyLike.increment_for(@created_by.id) if @post_action_type_id == PostActionType.types[:like]
|
||||||
|
|
Loading…
Reference in New Issue