* Add Follow#revoke_request!
* Implement Undo { Accept { Follow } } (fixes #8234)
			
			
This commit is contained in:
		@@ -5,6 +5,8 @@ class ActivityPub::Activity::Undo < ActivityPub::Activity
 | 
			
		||||
    case @object['type']
 | 
			
		||||
    when 'Announce'
 | 
			
		||||
      undo_announce
 | 
			
		||||
    when 'Accept'
 | 
			
		||||
      undo_accept
 | 
			
		||||
    when 'Follow'
 | 
			
		||||
      undo_follow
 | 
			
		||||
    when 'Like'
 | 
			
		||||
@@ -27,6 +29,10 @@ class ActivityPub::Activity::Undo < ActivityPub::Activity
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def undo_accept
 | 
			
		||||
    ::Follow.find_by(target_account: @account, uri: target_uri)&.revoke_request!
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def undo_follow
 | 
			
		||||
    target_account = account_from_uri(target_uri)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user