diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index 8990b2a847..8dd7b6e59f 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -46,12 +46,16 @@ class AdminMailer < ApplicationMailer end def new_software_updates + @software_updates = SoftwareUpdate.all.to_a.sort_by(&:gem_version) + locale_for_account(@me) do mail subject: default_i18n_subject(instance: @instance) end end def new_critical_software_updates + @software_updates = SoftwareUpdate.where(urgent: true).to_a.sort_by(&:gem_version) + headers['Priority'] = 'urgent' headers['X-Priority'] = '1' headers['Importance'] = 'high' diff --git a/app/views/admin_mailer/new_critical_software_updates.text.erb b/app/views/admin_mailer/new_critical_software_updates.text.erb index 63c170dc0d..e4886c2621 100644 --- a/app/views/admin_mailer/new_critical_software_updates.text.erb +++ b/app/views/admin_mailer/new_critical_software_updates.text.erb @@ -1,3 +1,7 @@ <%= raw t('admin_mailer.new_critical_software_updates.body') %> +<% @software_updates.each do |update| %> +- Mastodon #{update.version}: #{update.release_notes} +<% end %> + <%= raw t('application_mailer.view')%> <%= admin_software_updates_url %> diff --git a/app/views/admin_mailer/new_software_updates.text.erb b/app/views/admin_mailer/new_software_updates.text.erb index 96808f3cb3..7612b7c59f 100644 --- a/app/views/admin_mailer/new_software_updates.text.erb +++ b/app/views/admin_mailer/new_software_updates.text.erb @@ -1,3 +1,7 @@ <%= raw t('admin_mailer.new_software_updates.body') %> +<% @software_updates.each do |update| %> +- Mastodon #{update.version}: #{update.release_notes} +<% end %> + <%= raw t('application_mailer.view')%> <%= admin_software_updates_url %>