From 5bc4edd0784ed26ada36405ec2ba78a972822983 Mon Sep 17 00:00:00 2001 From: noiob <8197071+noiob@users.noreply.github.com> Date: Thu, 21 Nov 2019 11:35:39 +0100 Subject: [PATCH 01/10] Fix whitelist federation for subdomains (#12435) --- app/helpers/domain_control_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/domain_control_helper.rb b/app/helpers/domain_control_helper.rb index 067b2c2cd6..ac60cad295 100644 --- a/app/helpers/domain_control_helper.rb +++ b/app/helpers/domain_control_helper.rb @@ -6,7 +6,7 @@ module DomainControlHelper domain = begin if uri_or_domain.include?('://') - Addressable::URI.parse(uri_or_domain).domain + Addressable::URI.parse(uri_or_domain).host else uri_or_domain end From c4d45765e373464381ef5817a960b247f148e896 Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Nov 2019 11:36:16 +0100 Subject: [PATCH 02/10] Change domain block behavior to update user records before deleting data (#12247) When suspending or silencing a domain, one probably wants the silence or suspend parts to take effect as soon as possible. Deleting media files can take a while (possibly days), so perform silencing as soon as possible, and clean up media afterwards. --- app/services/block_domain_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb index ae461abf24..9f08606747 100644 --- a/app/services/block_domain_service.rb +++ b/app/services/block_domain_service.rb @@ -20,13 +20,13 @@ class BlockDomainService < BaseService end def process_domain_block! - clear_media! if domain_block.reject_media? - if domain_block.silence? silence_accounts! elsif domain_block.suspend? suspend_accounts! end + + clear_media! if domain_block.reject_media? end def invalidate_association_caches! From e86234b1e90975de6e507a86549f0eb4600c723b Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 21 Nov 2019 11:39:07 +0100 Subject: [PATCH 03/10] Change media description label to be context-sensitive (#12270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “Describe for the visually impaired” makes no sense when the uploaded media is an audio file. --- .../features/ui/components/focal_point_modal.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.js b/app/javascript/mastodon/features/ui/components/focal_point_modal.js index bbd463fca9..ddbe3961d2 100644 --- a/app/javascript/mastodon/features/ui/components/focal_point_modal.js +++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.js @@ -244,6 +244,16 @@ class FocalPointModal extends ImmutablePureComponent { const previewWidth = 200; const previewHeight = previewWidth / previewRatio; + let descriptionLabel = null; + + if (media.get('type') === 'audio') { + descriptionLabel = ; + } else if (media.get('type') === 'video') { + descriptionLabel = ; + } else { + descriptionLabel = ; + } + return (
@@ -255,7 +265,9 @@ class FocalPointModal extends ImmutablePureComponent {
{focals &&

} - +