mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:52:30 -05:00 
			
		
		
		
	[performance] use GetAccountByUsernameDomain() for local account lookups to rely on cache (#793)
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								1e1cdee06a
							
						
					
				
			
			
				commit
				
					
						614ab12733
					
				
			
		
					 19 changed files with 29 additions and 42 deletions
				
			
		|  | @ -31,7 +31,7 @@ import ( | |||
| 
 | ||||
| func (p *processor) GetOutbox(ctx context.Context, requestedUsername string, page bool, maxID string, minID string, requestURL *url.URL) (interface{}, gtserror.WithCode) { | ||||
| 	// get the account the request is referring to | ||||
| 	requestedAccount, err := p.db.GetLocalAccountByUsername(ctx, requestedUsername) | ||||
| 	requestedAccount, err := p.db.GetAccountByUsernameDomain(ctx, requestedUsername, "") | ||||
| 	if err != nil { | ||||
| 		return nil, gtserror.NewErrorNotFound(fmt.Errorf("database error getting account with username %s: %s", requestedUsername, err)) | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue