Fix hiding emoji reactions from anonymous
This commit is contained in:
parent
ac33bc86fe
commit
d450549d14
4 changed files with 9 additions and 1 deletions
|
@ -127,7 +127,9 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||
|
||||
def emoji_reactions_count
|
||||
if current_user&.account.nil?
|
||||
Setting.enable_emoji_reaction ? object.emoji_reactions_count : 0
|
||||
return 0 unless Setting.enable_emoji_reaction
|
||||
|
||||
object.account.emoji_reaction_policy == :allow ? object.emoji_reactions_count : 0
|
||||
else
|
||||
object.account.show_emoji_reaction?(current_user.account) ? object.emoji_reactions_count : 0
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue