Merge tag 'v2.9.2' into instance_only_statuses
This commit is contained in:
@ -106,7 +106,7 @@ module Mastodon
|
||||
[json, account.id, inbox_url]
|
||||
end
|
||||
|
||||
account.update_column(:suspended, true)
|
||||
account.suspend!
|
||||
end
|
||||
|
||||
processed += 1
|
||||
|
@ -87,8 +87,8 @@ module Mastodon
|
||||
end
|
||||
end
|
||||
|
||||
account.suspended = false
|
||||
user.account = account
|
||||
account.suspended_at = nil
|
||||
user.account = account
|
||||
|
||||
if user.save
|
||||
if options[:confirmed]
|
||||
|
@ -28,10 +28,15 @@ module Mastodon
|
||||
say('.', :green, false)
|
||||
end
|
||||
|
||||
DomainBlock.where(domain: domain).destroy_all
|
||||
DomainBlock.where(domain: domain).destroy_all unless options[:dry_run]
|
||||
|
||||
say
|
||||
say("Removed #{removed} accounts#{dry_run}", :green)
|
||||
|
||||
custom_emojis = CustomEmoji.where(domain: domain)
|
||||
custom_emojis_count = custom_emojis.count
|
||||
custom_emojis.destroy_all unless options[:dry_run]
|
||||
say("Removed #{custom_emojis_count} custom emojis", :green)
|
||||
end
|
||||
|
||||
option :concurrency, type: :numeric, default: 50, aliases: [:c]
|
||||
|
@ -15,9 +15,9 @@ module Mastodon
|
||||
option :suffix
|
||||
option :overwrite, type: :boolean
|
||||
option :unlisted, type: :boolean
|
||||
desc 'import PATH', 'Import emoji from a TAR archive at PATH'
|
||||
desc 'import PATH', 'Import emoji from a TAR GZIP archive at PATH'
|
||||
long_desc <<-LONG_DESC
|
||||
Imports custom emoji from a TAR archive specified by PATH.
|
||||
Imports custom emoji from a TAR GZIP archive specified by PATH.
|
||||
|
||||
Existing emoji will be skipped unless the --overwrite option
|
||||
is provided, in which case they will be overwritten.
|
||||
|
@ -9,7 +9,7 @@ module Mastodon
|
||||
end
|
||||
|
||||
def minor
|
||||
8
|
||||
9
|
||||
end
|
||||
|
||||
def patch
|
||||
|
19
lib/paperclip/type_corrector.rb
Normal file
19
lib/paperclip/type_corrector.rb
Normal file
@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'mime/types/columnar'
|
||||
|
||||
module Paperclip
|
||||
class TypeCorrector < Paperclip::Processor
|
||||
def make
|
||||
target_extension = options[:format]
|
||||
extension = File.extname(attachment.instance.file_file_name)
|
||||
|
||||
return @file unless options[:style] == :original && target_extension && extension != target_extension
|
||||
|
||||
attachment.instance.file_content_type = options[:content_type] || attachment.instance.file_content_type
|
||||
attachment.instance.file_file_name = File.basename(attachment.instance.file_file_name, '.*') + '.' + target_extension
|
||||
|
||||
@file
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user