Fix relay enabling/disabling not resetting inbox availability status (#10048)
Fix #10033
This commit is contained in:
		
							parent
							
								
									b163368c3e
								
							
						
					
					
						commit
						8ad75eea62
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -29,6 +29,7 @@ class Relay < ApplicationRecord
 | 
				
			||||||
    payload     = Oj.dump(follow_activity(activity_id))
 | 
					    payload     = Oj.dump(follow_activity(activity_id))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    update!(state: :pending, follow_activity_id: activity_id)
 | 
					    update!(state: :pending, follow_activity_id: activity_id)
 | 
				
			||||||
 | 
					    DeliveryFailureTracker.new(inbox_url).track_success!
 | 
				
			||||||
    ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)
 | 
					    ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,6 +38,7 @@ class Relay < ApplicationRecord
 | 
				
			||||||
    payload     = Oj.dump(unfollow_activity(activity_id))
 | 
					    payload     = Oj.dump(unfollow_activity(activity_id))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    update!(state: :idle, follow_activity_id: nil)
 | 
					    update!(state: :idle, follow_activity_id: nil)
 | 
				
			||||||
 | 
					    DeliveryFailureTracker.new(inbox_url).track_success!
 | 
				
			||||||
    ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)
 | 
					    ActivityPub::DeliveryWorker.perform_async(payload, some_local_account.id, inbox_url)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue