mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 21:52:31 -05:00 
			
		
		
		
	[chore] Tidy up status deletion, remove from cache too (#845)
* add func for deleting status from db + cache * move deletes entirely back to processor and also only do a delete if the requesting account owns the item being deleted * tidy up unboost processing * delete status more efficiently * fix wrong account id on remote test attachments * fix federator test
This commit is contained in:
		
					parent
					
						
							
								8c20626c51
							
						
					
				
			
			
				commit
				
					
						4cf76a2bfc
					
				
			
		
					 12 changed files with 113 additions and 94 deletions
				
			
		|  | @ -368,9 +368,12 @@ func (suite *FromFederatorTestSuite) TestProcessAccountDelete() { | |||
| 	suite.False(zorkFollowsSatan) | ||||
| 
 | ||||
| 	// no statuses from foss satan should be left in the database | ||||
| 	dbStatuses, err := suite.db.GetAccountStatuses(ctx, deletedAccount.ID, 0, false, false, "", "", false, false, false) | ||||
| 	suite.ErrorIs(err, db.ErrNoEntries) | ||||
| 	suite.Empty(dbStatuses) | ||||
| 	if !testrig.WaitFor(func() bool { | ||||
| 		s, err := suite.db.GetAccountStatuses(ctx, deletedAccount.ID, 0, false, false, "", "", false, false, false) | ||||
| 		return  s == nil && err == db.ErrNoEntries | ||||
| 	}) { | ||||
| 		suite.FailNow("timeout waiting for statuses to be deleted") | ||||
| 	} | ||||
| 
 | ||||
| 	dbAccount, err := suite.db.GetAccountByID(ctx, deletedAccount.ID) | ||||
| 	suite.NoError(err) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue