about summary refs log tree commit diff
path: root/app/views/notification_mailer
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-03-19 20:12:20 +0100
committerEugen Rochko <eugen@zeonfederated.com>2018-03-19 20:12:20 +0100
commit6b76a6212d8aa596379115b248ec145905946c42 (patch)
tree1e0889582c24f7259c29a476d600c0987e2e547c /app/views/notification_mailer
parent33ee347c995515946e0a045394fe693875ee1cdf (diff)
Display content warning in mail notification emails (#6832)
Diffstat (limited to 'app/views/notification_mailer')
-rw-r--r--app/views/notification_mailer/_status.html.haml5
-rw-r--r--app/views/notification_mailer/_status.text.erb5
2 files changed, 10 insertions, 0 deletions
diff --git a/app/views/notification_mailer/_status.html.haml b/app/views/notification_mailer/_status.html.haml
index f82ada146..57b5688bd 100644
--- a/app/views/notification_mailer/_status.html.haml
+++ b/app/views/notification_mailer/_status.html.haml
@@ -24,6 +24,11 @@
                                       %bdi= display_name(status.account)
                                       = "@#{status.account.acct}"
 
+                              - if status.spoiler_text?
+                                %div{ dir: rtl_status?(status) ? 'rtl' : 'ltr' }
+                                  %p
+                                    = Formatter.instance.format_spoiler(status)
+
                               %div{ dir: rtl_status?(status) ? 'rtl' : 'ltr' }
                                 = Formatter.instance.format(status)
 
diff --git a/app/views/notification_mailer/_status.text.erb b/app/views/notification_mailer/_status.text.erb
index 85a0136b7..8999a1f8e 100644
--- a/app/views/notification_mailer/_status.text.erb
+++ b/app/views/notification_mailer/_status.text.erb
@@ -1,3 +1,8 @@
+<% if status.spoiler_text? %>
+<%= raw status.spoiler_text %>
+----
+
+<% end %>
 <%= raw Formatter.instance.plaintext(status) %>
 
 <%= raw t('application_mailer.view')%> <%= web_url("statuses/#{status.id}") %>