mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 22:42:24 -05:00 
			
		
		
		
	[bugfix] Populate followReq before accessing targetaccount pointer (#2099)
This commit is contained in:
		
					parent
					
						
							
								5588d4e88e
							
						
					
				
			
			
				commit
				
					
						a26af1310f
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -265,6 +265,10 @@ func (p *fediAPI) CreateFollowReq(ctx context.Context, fMsg messages.FromFediAPI | ||||||
| 		return gtserror.Newf("%T not parseable as *gtsmodel.FollowRequest", fMsg.GTSModel) | 		return gtserror.Newf("%T not parseable as *gtsmodel.FollowRequest", fMsg.GTSModel) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	if err := p.state.DB.PopulateFollowRequest(ctx, followRequest); err != nil { | ||||||
|  | 		return gtserror.Newf("error populating follow request: %w", err) | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	if *followRequest.TargetAccount.Locked { | 	if *followRequest.TargetAccount.Locked { | ||||||
| 		// Account on our instance is locked: | 		// Account on our instance is locked: | ||||||
| 		// just notify the follow request. | 		// just notify the follow request. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue