mirror of
https://github.com/block/buzz.git
synced 2026-11-25 02:31:36 +00:00
fix(identity): harden corporate identity lifecycle
Signed-off-by: Cea Stapleton Cordasco <261786559+cea-block@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@ type RawProfile = {
|
||||
pubkey: string;
|
||||
display_name: string | null;
|
||||
verified_name?: string | null;
|
||||
verified_name_expires_at?: number | null;
|
||||
avatar_url: string | null;
|
||||
about: string | null;
|
||||
nip05_handle: string | null;
|
||||
@@ -41,6 +42,7 @@ function fromRawProfile(profile: RawProfile): Profile {
|
||||
pubkey: profile.pubkey,
|
||||
displayName: profile.display_name,
|
||||
verifiedName: profile.verified_name ?? null,
|
||||
verifiedNameExpiresAt: profile.verified_name_expires_at ?? null,
|
||||
avatarUrl: profile.avatar_url,
|
||||
about: profile.about,
|
||||
nip05Handle: profile.nip05_handle,
|
||||
@@ -55,6 +57,7 @@ function fromRawUserProfileSummary(
|
||||
return {
|
||||
displayName: profile.display_name,
|
||||
verifiedName: profile.verified_name ?? null,
|
||||
verifiedNameExpiresAt: profile.verified_name_expires_at ?? null,
|
||||
name: profile.name ?? null,
|
||||
avatarUrl: profile.avatar_url,
|
||||
nip05Handle: profile.nip05_handle,
|
||||
@@ -68,6 +71,7 @@ function fromRawUserSearchResult(user: RawUserSearchResult): UserSearchResult {
|
||||
pubkey: user.pubkey,
|
||||
displayName: user.display_name,
|
||||
verifiedName: user.verified_name ?? null,
|
||||
verifiedNameExpiresAt: user.verified_name_expires_at ?? null,
|
||||
avatarUrl: user.avatar_url,
|
||||
nip05Handle: user.nip05_handle,
|
||||
ownerPubkey: user.owner_pubkey,
|
||||
|
||||
@@ -110,6 +110,8 @@ export type Profile = {
|
||||
displayName: string | null;
|
||||
/** Relay-authoritative display identity bound to this pubkey. */
|
||||
verifiedName?: string | null;
|
||||
/** Unix timestamp (seconds) after which `verifiedName` is no longer trusted. */
|
||||
verifiedNameExpiresAt?: number | null;
|
||||
avatarUrl: string | null;
|
||||
about: string | null;
|
||||
nip05Handle: string | null;
|
||||
@@ -125,6 +127,8 @@ export type UserProfileSummary = {
|
||||
displayName: string | null;
|
||||
/** Relay-authoritative display identity bound to this pubkey. */
|
||||
verifiedName?: string | null;
|
||||
/** Unix timestamp (seconds) after which `verifiedName` is no longer trusted. */
|
||||
verifiedNameExpiresAt?: number | null;
|
||||
/** Kind-0 `name` field, kept separate from `displayName` so @mention text
|
||||
* can be matched against either alias (agents/CLI resolve mentions against
|
||||
* `display_name` *or* `name` at send time). */
|
||||
@@ -144,6 +148,7 @@ export type UserSearchResult = {
|
||||
pubkey: string;
|
||||
displayName: string | null;
|
||||
verifiedName?: string | null;
|
||||
verifiedNameExpiresAt?: number | null;
|
||||
avatarUrl: string | null;
|
||||
nip05Handle: string | null;
|
||||
ownerPubkey: string | null;
|
||||
|
||||
Reference in New Issue
Block a user