mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 11:42:25 -05:00 
			
		
		
		
	[bugfix] only check replyTo visibility during permission checks IF status is local (#2757)
This commit is contained in:
		
					parent
					
						
							
								92bf1f779b
							
						
					
				
			
			
				commit
				
					
						459e75a9db
					
				
			
		
					 1 changed files with 13 additions and 9 deletions
				
			
		|  | @ -621,6 +621,10 @@ func (d *Dereferencer) isPermittedStatus( | ||||||
| 		return onFail() | 		return onFail() | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	// Default to true | ||||||
|  | 	permitted = true | ||||||
|  | 
 | ||||||
|  | 	if *status.InReplyTo.Local { | ||||||
| 		// Check visibility of inReplyTo to status author. | 		// Check visibility of inReplyTo to status author. | ||||||
| 		permitted, err = d.visibility.StatusVisible(ctx, | 		permitted, err = d.visibility.StatusVisible(ctx, | ||||||
| 			status.Account, | 			status.Account, | ||||||
|  | @ -629,11 +633,11 @@ func (d *Dereferencer) isPermittedStatus( | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return false, gtserror.Newf("error checking in-reply-to visibility: %w", err) | 			return false, gtserror.Newf("error checking in-reply-to visibility: %w", err) | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	if permitted && | 	if permitted && | ||||||
| 		*status.InReplyTo.Replyable { | 		*status.InReplyTo.Replyable { | ||||||
| 		// This status is visible AND | 		// Status is reply-able to. | ||||||
| 		// replyable, in this economy?! |  | ||||||
| 		return true, nil | 		return true, nil | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue