Replace `anonymous_identifier` with `author_identifier`

This commit is contained in:
Karina Kwiatek 2022-06-26 20:59:53 +02:00 committed by Andreas Nedbal
parent ddd7cfd81d
commit e64f206f5b
2 changed files with 5 additions and 5 deletions

View File

@ -27,14 +27,14 @@ module UserHelper
link_to(user.profile.safe_name, show_user_profile_path(user.screen_name), class: ("user--banned" if user.banned?).to_s)
end
def should_unmask?(anonymous_identifier)
moderation_view? && anonymous_identifier.present?
def should_unmask?(author_identifier)
moderation_view? && author_identifier.present?
end
def unmask(user, context_user, anonymous_identifier)
def unmask(user, context_user, author_identifier)
return profile_link(user) if user.present?
content_tag(:abbr, anonymous_name(context_user), title: anonymous_identifier)
content_tag(:abbr, anonymous_name(context_user), title: author_identifier)
end
def anonymous_name(context_user)

View File

@ -27,7 +27,7 @@
= t 'views.actions.report'
%h6.text-muted.media-heading.answerbox__question-user
- if hidden
= user_screen_name question.user, anonymous_identifier: question.author_identifier, url: false
= user_screen_name question.user, author_identifier: question.author_identifier, url: false
- else
= raw t('views.answerbox.asked', user: user_screen_name(question.user, author_identifier: question.author_identifier), time: time_tooltip(question))
.answerbox__question-text= question_markdown question.content