mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 22:02:25 -05:00 
			
		
		
		
	add (now) missing slice reverse of tag timeline statuses when paging ASC
This commit is contained in:
		
					parent
					
						
							
								96250a941c
							
						
					
				
			
			
				commit
				
					
						294e1a6bd8
					
				
			
		
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -21,6 +21,7 @@ import ( | |||
| 	"context" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"slices" | ||||
| 
 | ||||
| 	apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" | ||||
| 	"github.com/superseriousbusiness/gotosocial/internal/db" | ||||
|  | @ -71,6 +72,12 @@ func (p *Processor) TagTimelineGet( | |||
| 		return nil, gtserror.NewErrorInternalError(err) | ||||
| 	} | ||||
| 
 | ||||
| 	if page.Order().Ascending() { | ||||
| 		// Returned statuses always | ||||
| 		// need to be in DESC order. | ||||
| 		slices.Reverse(statuses) | ||||
| 	} | ||||
| 
 | ||||
| 	return p.packageTagResponse( | ||||
| 		ctx, | ||||
| 		requestingAcct, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue