mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 23:02:25 -05:00 
			
		
		
		
	if accountDomain isn't set, use Host value instead (#380)
This commit is contained in:
		
					parent
					
						
							
								1b36e85840
							
						
					
				
			
			
				commit
				
					
						85b4f96263
					
				
			
		
					 2 changed files with 6 additions and 0 deletions
				
			
		|  | @ -44,6 +44,9 @@ func (p *processor) GetWebfingerAccount(ctx context.Context, requestedUsername s | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	accountDomain := viper.GetString(config.Keys.AccountDomain) | 	accountDomain := viper.GetString(config.Keys.AccountDomain) | ||||||
|  | 	if accountDomain == "" { | ||||||
|  | 		accountDomain = viper.GetString(config.Keys.Host) | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	// return the webfinger representation | 	// return the webfinger representation | ||||||
| 	return &apimodel.WellKnownResponse{ | 	return &apimodel.WellKnownResponse{ | ||||||
|  |  | ||||||
|  | @ -623,6 +623,9 @@ func (c *converter) MentionToAS(ctx context.Context, m *gtsmodel.Mention) (vocab | ||||||
| 	var domain string | 	var domain string | ||||||
| 	if m.TargetAccount.Domain == "" { | 	if m.TargetAccount.Domain == "" { | ||||||
| 		accountDomain := viper.GetString(config.Keys.AccountDomain) | 		accountDomain := viper.GetString(config.Keys.AccountDomain) | ||||||
|  | 		if accountDomain == "" { | ||||||
|  | 			accountDomain = viper.GetString(config.Keys.Host) | ||||||
|  | 		} | ||||||
| 		domain = accountDomain | 		domain = accountDomain | ||||||
| 	} else { | 	} else { | ||||||
| 		domain = m.TargetAccount.Domain | 		domain = m.TargetAccount.Domain | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue