@@ -13,6 +13,7 @@ export type VerifiedProfileAuthority = Readonly<{
1313export type VerifiedProfile = Readonly < {
1414 displayName : string ;
1515 username : string ;
16+ fullName ?: string ;
1617 issuerLabel : string ;
1718 verifiedAt : number ;
1819 /** Observed on a completed current subscription, or retained while unreconciled. */
@@ -91,12 +92,19 @@ export function verifiedProfile(
9192 checked : boolean ,
9293) : VerifiedProfile | undefined {
9394 const subject = verifiedProfileSubject ( event , authority ) ;
94- if ( ! subject || event . content !== "" || event . tags . length !== 7 ) return ;
95+ if (
96+ ! subject ||
97+ event . content !== "" ||
98+ ( event . tags . length !== 7 && event . tags . length !== 8 )
99+ )
100+ return ;
95101 const tags = new Map < string , string > ( ) ;
96102 for ( const entry of event . tags ) {
97103 if ( entry . length !== 2 || tags . has ( entry [ 0 ] as string ) ) return ;
98104 tags . set ( entry [ 0 ] as string , entry [ 1 ] as string ) ;
99105 }
106+ if ( tags . size !== 7 + Number ( tags . has ( "full_name" ) ) ) return ;
107+ const fullName = tags . get ( "full_name" ) ;
100108 const displayName = tags . get ( "display_name" ) ;
101109 const username = tags . get ( "username" ) ;
102110 const issuerLabel = tags . get ( "issuer_label" ) ;
@@ -105,6 +113,7 @@ export function verifiedProfile(
105113 if (
106114 tags . get ( "p" ) !== subject ||
107115 tags . get ( "active" ) !== "true" ||
116+ ( fullName !== undefined && ! validVerifiedName ( fullName ) ) ||
108117 ! displayName ||
109118 ! validVerifiedName ( displayName ) ||
110119 ! username ||
@@ -120,6 +129,7 @@ export function verifiedProfile(
120129 return Object . freeze ( {
121130 displayName,
122131 username,
132+ ...( fullName !== undefined ? { fullName } : { } ) ,
123133 issuerLabel,
124134 verifiedAt,
125135 status : checked ? "checked" : "cached" ,
0 commit comments