kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
feat: add lud16 field
rodzic
e9b830afa6
commit
9aa160d687
|
@ -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 ?? '',
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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<z.infer<typeof accountSchema>>;
|
||||
|
||||
export { accountSchema, type Account };
|
||||
export { accountSchema, type Account };
|
||||
|
|
Ładowanie…
Reference in New Issue