diff --git a/src/features/edit-profile/index.tsx b/src/features/edit-profile/index.tsx index a01fbe816..a7ebd102c 100644 --- a/src/features/edit-profile/index.tsx +++ b/src/features/edit-profile/index.tsx @@ -128,6 +128,9 @@ interface AccountCredentials { birthday?: string; /** Nostr NIP-05 identifier. */ nip05?: string; + /** Lightning address. + * https://github.com/lnurl/luds/blob/luds/16.md */ + lud16?: string; } /** Convert an account into an update_credentials request object. */ @@ -151,6 +154,7 @@ const accountToCredentials = (account: Account): AccountCredentials => { location: account.location, birthday: account.pleroma?.birthday ?? undefined, nip05: account.source?.nostr?.nip05 ?? '', + lud16: account?.nostr?.lud16 ?? '', }; }; diff --git a/src/schemas/account.ts b/src/schemas/account.ts index 4bb9536e1..966e03ef0 100644 --- a/src/schemas/account.ts +++ b/src/schemas/account.ts @@ -63,6 +63,7 @@ const baseAccountSchema = z.object({ ]).catch(null), nostr: coerceObject({ pubkey: n.id().optional().catch(undefined), + lud16: z.string().email().optional().catch(undefined), }), note: contentSchema, /** Fedibird extra settings. */ @@ -183,4 +184,4 @@ const accountSchema = baseAccountSchema.extend({ type Account = Resolve>; -export { accountSchema, type Account }; \ No newline at end of file +export { accountSchema, type Account };