mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:32:24 -05:00 
			
		
		
		
	don't allow multiple entries for BoostOfID values to prevent repeated boosts of same boosts
This commit is contained in:
		
					parent
					
						
							
								5bab57226e
							
						
					
				
			
			
				commit
				
					
						f715bec563
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		
							
								
								
									
										5
									
								
								internal/cache/timeline/status.go
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								internal/cache/timeline/status.go
									
										
									
									
										vendored
									
									
								
							|  | @ -272,7 +272,7 @@ func (t *StatusTimeline) Init(cap int) { | |||
| 
 | ||||
| 		Indices: []structr.IndexConfig{ | ||||
| 			{Fields: "AccountID", Multiple: true}, | ||||
| 			{Fields: "BoostOfID", Multiple: true}, | ||||
| 			{Fields: "BoostOfID", Multiple: false}, | ||||
| 			{Fields: "BoostOfAccountID", Multiple: true}, | ||||
| 		}, | ||||
| 
 | ||||
|  | @ -298,6 +298,9 @@ func (t *StatusTimeline) Init(cap int) { | |||
| 	t.idx_AccountID = t.cache.Index("AccountID") | ||||
| 	t.idx_BoostOfID = t.cache.Index("BoostOfID") | ||||
| 	t.idx_BoostOfAccountID = t.cache.Index("BoostOfAccountID") | ||||
| 
 | ||||
| 	// Set max. | ||||
| 	t.max = cap | ||||
| } | ||||
| 
 | ||||
| // Load ... | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue