Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `app/models/account.rb`:
  Conflict because we (glitch-soc) have disabled trending of posts without
  review.
  Discarded that upstream change.
- `app/views/admin/settings/discovery/show.html.haml`:
  Just an extra setting in glitch-soc.
  Kept that extra setting.
This commit is contained in:
Claire
2022-11-12 13:28:03 +01:00
211 changed files with 2786 additions and 1413 deletions

View File

@@ -17,7 +17,7 @@ module Mastodon
end
def flags
'rc2'
'rc3'
end
def suffix

View File

@@ -5,7 +5,7 @@ module Paperclip
def make
return @file unless options[:style] == :small || options[:blurhash]
pixels = convert(':source RGB:-', source: File.expand_path(@file.path)).unpack('C*')
pixels = convert(':source -depth 8 RGB:-', source: File.expand_path(@file.path)).unpack('C*')
geometry = options.fetch(:file_geometry_parser).from_file(@file)
attachment.instance.blurhash = Blurhash.encode(geometry.width, geometry.height, pixels, **(options[:blurhash] || {}))

View File

@@ -271,6 +271,7 @@ namespace :mastodon do
env['SMTP_PORT'] = 25
env['SMTP_AUTH_METHOD'] = 'none'
env['SMTP_OPENSSL_VERIFY_MODE'] = 'none'
env['SMTP_ENABLE_STARTTLS'] = 'auto'
else
env['SMTP_SERVER'] = prompt.ask('SMTP server:') do |q|
q.required true
@@ -299,6 +300,8 @@ namespace :mastodon do
end
env['SMTP_OPENSSL_VERIFY_MODE'] = prompt.select('SMTP OpenSSL verify mode:', %w(none peer client_once fail_if_no_peer_cert))
env['SMTP_ENABLE_STARTTLS'] = prompt.select('Enable STARTTLS:', %w(auto always never))
end
env['SMTP_FROM_ADDRESS'] = prompt.ask('E-mail address to send e-mails "from":') do |q|
@@ -312,6 +315,20 @@ namespace :mastodon do
send_to = prompt.ask('Send test e-mail to:', required: true)
begin
enable_starttls = nil
enable_starttls_auto = nil
case env['SMTP_ENABLE_STARTTLS']
when 'always'
enable_starttls = true
when 'never'
enable_starttls = false
when 'auto'
enable_starttls_auto = true
else
enable_starttls_auto = env['SMTP_ENABLE_STARTTLS_AUTO'] != 'false'
end
ActionMailer::Base.smtp_settings = {
port: env['SMTP_PORT'],
address: env['SMTP_SERVER'],
@@ -320,7 +337,8 @@ namespace :mastodon do
domain: env['LOCAL_DOMAIN'],
authentication: env['SMTP_AUTH_METHOD'] == 'none' ? nil : env['SMTP_AUTH_METHOD'] || :plain,
openssl_verify_mode: env['SMTP_OPENSSL_VERIFY_MODE'],
enable_starttls_auto: true,
enable_starttls: enable_starttls,
enable_starttls_auto: enable_starttls_auto,
}
ActionMailer::Base.default_options = {