Remove Salmon and PubSubHubbub (#11205)
* Remove Salmon and PubSubHubbub endpoints * Add error when trying to follow OStatus accounts * Fix new accounts not being created in ResolveAccountService
This commit is contained in:
		
					parent
					
						
							
								c07cca4727
							
						
					
				
			
			
				commit
				
					
						23aeef52cc
					
				
			
		
					 102 changed files with 70 additions and 3569 deletions
				
			
		|  | @ -1,31 +0,0 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class Api::V1::FollowsController < Api::BaseController | ||||
|   before_action -> { doorkeeper_authorize! :follow, :'write:follows' } | ||||
|   before_action :require_user! | ||||
| 
 | ||||
|   respond_to :json | ||||
| 
 | ||||
|   def create | ||||
|     raise ActiveRecord::RecordNotFound if follow_params[:uri].blank? | ||||
| 
 | ||||
|     @account = FollowService.new.call(current_user.account, target_uri).try(:target_account) | ||||
| 
 | ||||
|     if @account.nil? | ||||
|       username, domain = target_uri.split('@') | ||||
|       @account         = Account.find_remote!(username, domain) | ||||
|     end | ||||
| 
 | ||||
|     render json: @account, serializer: REST::AccountSerializer | ||||
|   end | ||||
| 
 | ||||
|   private | ||||
| 
 | ||||
|   def target_uri | ||||
|     follow_params[:uri].strip.gsub(/\A@/, '') | ||||
|   end | ||||
| 
 | ||||
|   def follow_params | ||||
|     params.permit(:uri) | ||||
|   end | ||||
| end | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue