2
0

Fix moderation warning e-mails that include posts (#36462)

This commit is contained in:
Claire
2025-10-14 13:48:51 +02:00
parent cef2c50a71
commit 1e27ab0885
3 changed files with 6 additions and 4 deletions

View File

@@ -11,7 +11,7 @@
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
%tr
%td.email-status-content
= render 'status_content', status: status
= render 'notification_mailer/status_content', status: status
%p.email-status-footer
= link_to l(status.created_at.in_time_zone(time_zone.presence), format: :with_time_zone), web_url("@#{status.account.pretty_acct}/#{status.id}")

View File

@@ -11,12 +11,12 @@
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
%tr
%td.email-status-content
= render 'status_content', status: status
= render 'notification_mailer/status_content', status: status
- if status.local? && status.quote
%table.email-inner-card-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
%tr
%td.email-inner-nested-card-td
= render 'nested_quote', status: status.quote.quoted_status, time_zone: time_zone
= render 'notification_mailer/nested_quote', status: status.quote.quoted_status, time_zone: time_zone
%p.email-status-footer
= link_to l(status.created_at.in_time_zone(time_zone.presence), format: :with_time_zone), web_url("@#{status.account.pretty_acct}/#{status.id}")

View File

@@ -141,7 +141,9 @@ RSpec.describe UserMailer do
end
describe '#warning' do
let(:strike) { Fabricate(:account_warning, target_account: receiver.account, text: 'dont worry its just the testsuite', action: 'suspend') }
let(:status) { Fabricate(:status, account: receiver.account) }
let(:quote) { Fabricate(:quote, state: :accepted, status: status) }
let(:strike) { Fabricate(:account_warning, target_account: receiver.account, text: 'dont worry its just the testsuite', action: 'suspend', status_ids: [quote.status_id]) }
let(:mail) { described_class.warning(receiver, strike) }
it 'renders warning notification' do