mirror of
https://github.com/funamitech/mastodon
synced 2024-11-28 06:48:45 +09:00
Fix ArgumentError in mailers when a user's timezone is blank (#26025)
This commit is contained in:
parent
97ce47e451
commit
c667fc5a4a
@ -42,4 +42,4 @@
|
|||||||
= link_to a.remote_url, a.remote_url
|
= link_to a.remote_url, a.remote_url
|
||||||
|
|
||||||
%p.status-footer
|
%p.status-footer
|
||||||
= link_to l(status.created_at.in_time_zone(time_zone)), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
= link_to l(status.created_at.in_time_zone(time_zone.presence)), web_url("@#{status.account.pretty_acct}/#{status.id}")
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
%tbody
|
%tbody
|
||||||
%tr
|
%tr
|
||||||
%td.column-cell.text-center
|
%td.column-cell.text-center
|
||||||
%p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone))
|
%p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence))
|
||||||
|
|
||||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||||
%tbody
|
%tbody
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
===
|
===
|
||||||
|
|
||||||
<%= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) %>
|
<%= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence)) %>
|
||||||
|
|
||||||
=> <%= root_url %>
|
=> <%= root_url %>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
%tbody
|
%tbody
|
||||||
%tr
|
%tr
|
||||||
%td.column-cell.text-center
|
%td.column-cell.text-center
|
||||||
%p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone))
|
%p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence))
|
||||||
|
|
||||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||||
%tbody
|
%tbody
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
===
|
===
|
||||||
|
|
||||||
<%= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) %>
|
<%= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence)) %>
|
||||||
|
|
||||||
=> <%= root_url %>
|
=> <%= root_url %>
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
%strong= "#{t('sessions.browser')}:"
|
%strong= "#{t('sessions.browser')}:"
|
||||||
%span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s), platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s)
|
%span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s), platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s)
|
||||||
%br/
|
%br/
|
||||||
= l(@timestamp.in_time_zone(@resource.time_zone))
|
= l(@timestamp.in_time_zone(@resource.time_zone.presence))
|
||||||
|
|
||||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||||
%tbody
|
%tbody
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<%= t('sessions.ip') %>: <%= @remote_ip %>
|
<%= t('sessions.ip') %>: <%= @remote_ip %>
|
||||||
<%= t('sessions.browser') %>: <%= t('sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: "#{@detection.id}"), platform: t("sessions.platforms.#{@detection.platform.id}", default: "#{@detection.platform.id}")) %>
|
<%= t('sessions.browser') %>: <%= t('sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: "#{@detection.id}"), platform: t("sessions.platforms.#{@detection.platform.id}", default: "#{@detection.platform.id}")) %>
|
||||||
<%= l(@timestamp.in_time_zone(@resource.time_zone)) %>
|
<%= l(@timestamp.in_time_zone(@resource.time_zone.presence)) %>
|
||||||
|
|
||||||
<%= t 'user_mailer.suspicious_sign_in.further_actions_html', action: t('user_mailer.suspicious_sign_in.change_password') %>
|
<%= t 'user_mailer.suspicious_sign_in.further_actions_html', action: t('user_mailer.suspicious_sign_in.change_password') %>
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
- unless @statuses.empty?
|
- unless @statuses.empty?
|
||||||
- @statuses.each_with_index do |status, i|
|
- @statuses.each_with_index do |status, i|
|
||||||
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone
|
= render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone.presence
|
||||||
|
|
||||||
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
%table.email-table{ cellspacing: 0, cellpadding: 0 }
|
||||||
%tbody
|
%tbody
|
||||||
|
Loading…
Reference in New Issue
Block a user