Merge branch 'master' into 454-allow-keyword-mutes-to-skip-mentions

This commit is contained in:
David Yip
2018-06-12 18:13:30 -05:00
committed by GitHub
62 changed files with 868 additions and 195 deletions

View File

@ -15,7 +15,8 @@ class Api::V1::DomainBlocksController < Api::BaseController
end
def create
BlockDomainFromAccountService.new.call(current_account, domain_block_params[:domain])
current_account.block_domain!(domain_block_params[:domain])
AfterAccountDomainBlockWorker.perform_async(current_account.id, domain_block_params[:domain])
render_empty
end

View File

@ -1,9 +1,10 @@
# frozen_string_literal: true
class IntentsController < ApplicationController
def show
uri = Addressable::URI.parse(params[:uri])
before_action :check_uri
rescue_from Addressable::URI::InvalidURIError, with: :handle_invalid_uri
def show
if uri.scheme == 'web+mastodon'
case uri.host
when 'follow'
@ -15,4 +16,18 @@ class IntentsController < ApplicationController
not_found
end
private
def check_uri
not_found if uri.blank?
end
def handle_invalid_uri
not_found
end
def uri
@uri ||= Addressable::URI.parse(params[:uri])
end
end

View File

@ -11,7 +11,7 @@ class Settings::FollowerDomainsController < Settings::BaseController
def update
domains = bulk_params[:select] || []
SoftBlockDomainFollowersWorker.push_bulk(domains) do |domain|
AfterAccountDomainBlockWorker.push_bulk(domains) do |domain|
[current_account.id, domain]
end