1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Add list of pending releases directly in mail notifications for version updates (#29436)

This commit is contained in:
Claire 2024-03-26 15:45:19 +01:00 committed by GitHub
parent 32938dadd7
commit cfea9cc172
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View file

@ -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'

View file

@ -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 %>

View file

@ -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 %>