mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: On refresh, wouldn't say "You liked this"
This commit is contained in:
@@ -155,11 +155,11 @@ class PostSerializer < ApplicationSerializer
|
|||||||
# The following only applies if you're logged in
|
# The following only applies if you're logged in
|
||||||
if action_summary[:can_act] && scope.current_user.present?
|
if action_summary[:can_act] && scope.current_user.present?
|
||||||
action_summary[:can_clear_flags] = scope.is_admin? && PostActionType.flag_types.values.include?(id)
|
action_summary[:can_clear_flags] = scope.is_admin? && PostActionType.flag_types.values.include?(id)
|
||||||
|
end
|
||||||
|
|
||||||
if post_actions.present? && post_actions.has_key?(id)
|
if post_actions.present? && post_actions.has_key?(id)
|
||||||
action_summary[:acted] = true
|
action_summary[:acted] = true
|
||||||
action_summary[:can_undo] = scope.can_delete?(post_actions[id])
|
action_summary[:can_undo] = scope.can_delete?(post_actions[id])
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# anonymize flags
|
# anonymize flags
|
||||||
|
|||||||
Reference in New Issue
Block a user