use fqn for local account instead of building manually
				
					
				
			This commit is contained in:
		
							parent
							
								
									b74b19cc73
								
							
						
					
					
						commit
						b170a532f6
					
				
					 4 changed files with 5 additions and 3 deletions
				
			
		|  | @ -31,6 +31,8 @@ export function parseAccount(data) { | ||||||
|     else |     else | ||||||
|         account.host = get(server).host; |         account.host = get(server).host; | ||||||
| 
 | 
 | ||||||
|  |     account.fqn = data.fqn || account.username + account.host; | ||||||
|  | 
 | ||||||
|     account.mention = "@" + account.username; |     account.mention = "@" + account.username; | ||||||
|     if (account.host != get(server).host) |     if (account.host != get(server).host) | ||||||
|         account.mention += "@" + account.host; |         account.mention += "@" + account.host; | ||||||
|  |  | ||||||
|  | @ -175,7 +175,7 @@ | ||||||
|             <div class="account-name" aria-hidden="true"> |             <div class="account-name" aria-hidden="true"> | ||||||
|                 <a href={$account.url} class="nickname" title={$account.nickname}>{@html $account.rich_name}</a> |                 <a href={$account.url} class="nickname" title={$account.nickname}>{@html $account.rich_name}</a> | ||||||
|                 <span class="username" title={`@${$account.username}@${$account.host}`}> |                 <span class="username" title={`@${$account.username}@${$account.host}`}> | ||||||
|                     {`@${$account.username}@${$account.host}`} |                     {$account.fqn} | ||||||
|                 </span> |                 </span> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|  | @ -28,7 +28,7 @@ | ||||||
|         if (!data) return; |         if (!data) return; | ||||||
| 
 | 
 | ||||||
|         account.set(parseAccount(data)); |         account.set(parseAccount(data)); | ||||||
|         console.log(`Logged in as @${$account.username}@${$account.host}`); |         console.log(`Logged in as ${$account.fqn}`); | ||||||
| 
 | 
 | ||||||
|         // spin up async task to fetch notifications |         // spin up async task to fetch notifications | ||||||
|         const notif_data = await api.getNotifications( |         const notif_data = await api.getNotifications( | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ | ||||||
|                 if (!data) return goto("/"); |                 if (!data) return goto("/"); | ||||||
| 
 | 
 | ||||||
|                 account.set(parseAccount(data)); |                 account.set(parseAccount(data)); | ||||||
|                 console.log(`Logged in as @${get(account).username}@${get(account).host}`); |                 console.log(`Logged in as ${get(account).fqn}`); | ||||||
| 
 | 
 | ||||||
|                 // spin up async task to fetch notifications |                 // spin up async task to fetch notifications | ||||||
|                 return api.getNotifications( |                 return api.getNotifications( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue