diff --git a/app/views/admin/accounts/_counters.html.haml b/app/views/admin/accounts/_counters.html.haml index 00ab98d094a..3c99da9f2c8 100644 --- a/app/views/admin/accounts/_counters.html.haml +++ b/app/views/admin/accounts/_counters.html.haml @@ -30,9 +30,9 @@ = t('admin.accounts.suspended') - elsif account.silenced? = t('admin.accounts.silenced') - - elsif account.local? && account.user&.disabled? + - elsif account.local? && account.user_disabled? = t('admin.accounts.disabled') - - elsif account.local? && !account.user&.confirmed? + - elsif account.local? && !account.user_confirmed? = t('admin.accounts.confirming') - elsif account.local? && !account.user_approved? = t('admin.accounts.pending') diff --git a/app/views/admin/accounts/_local_account.html.haml b/app/views/admin/accounts/_local_account.html.haml index 892afcc5428..bff752332c6 100644 --- a/app/views/admin/accounts/_local_account.html.haml +++ b/app/views/admin/accounts/_local_account.html.haml @@ -34,7 +34,7 @@ %tr %th= t('admin.accounts.email_status') %td - - if account.user&.confirmed? + - if account.user_confirmed? = t('admin.accounts.confirmed') - else = t('admin.accounts.confirming') diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml index 6f762d94ebf..44664b85fd9 100644 --- a/app/views/admin/reports/index.html.haml +++ b/app/views/admin/reports/index.html.haml @@ -42,7 +42,7 @@ %span.red= t('admin.accounts.suspended') - elsif target_account.silenced? %span.red= t('admin.accounts.silenced') - - elsif target_account.user&.disabled? + - elsif target_account.user_disabled? %span.red= t('admin.accounts.disabled') - else %span.neutral= t('admin.accounts.no_limits_imposed') diff --git a/app/workers/move_worker.rb b/app/workers/move_worker.rb index a18f38556bb..9b9c6879e5c 100644 --- a/app/workers/move_worker.rb +++ b/app/workers/move_worker.rb @@ -81,7 +81,7 @@ class MoveWorker def copy_account_notes! AccountNote.where(target_account: @source_account).find_each do |note| - text = I18n.with_locale(note.account.user&.locale.presence || I18n.default_locale) do + text = I18n.with_locale(note.account.user_locale.presence || I18n.default_locale) do I18n.t('move_handler.copy_account_note_text', acct: @source_account.acct) end @@ -124,7 +124,7 @@ class MoveWorker def add_account_note_if_needed!(account, id) unless AccountNote.exists?(account: account, target_account: @target_account) - text = I18n.with_locale(account.user&.locale.presence || I18n.default_locale) do + text = I18n.with_locale(account.user_locale.presence || I18n.default_locale) do I18n.t(id, acct: @source_account.acct) end AccountNote.create!(account: account, target_account: @target_account, comment: text) diff --git a/app/workers/publish_scheduled_status_worker.rb b/app/workers/publish_scheduled_status_worker.rb index 0ec081de917..bcf20b49431 100644 --- a/app/workers/publish_scheduled_status_worker.rb +++ b/app/workers/publish_scheduled_status_worker.rb @@ -9,7 +9,7 @@ class PublishScheduledStatusWorker scheduled_status = ScheduledStatus.find(scheduled_status_id) scheduled_status.destroy! - return true if scheduled_status.account.user.disabled? + return true if scheduled_status.account.user_disabled? PostStatusService.new.call( scheduled_status.account,