Add NIP-05 verification compatibility
This commit is contained in:
parent
2e7d12b3e6
commit
04bd6dd35d
6 changed files with 65 additions and 0 deletions
|
|
@ -81,6 +81,19 @@ class User(ModelMeta, AbstractUser):
|
|||
help_text="SHA-256 hash of the user's OpenID URL, used for Libravatar",
|
||||
)
|
||||
|
||||
nostr_key = models.CharField(
|
||||
max_length=32,
|
||||
unique=True,
|
||||
blank=True,
|
||||
null=True,
|
||||
help_text="A Nostr public key in 32-byte hex format",
|
||||
)
|
||||
nostr_relays = models.JSONField(
|
||||
default=list,
|
||||
blank=True,
|
||||
help_text="An array of Nostr relay URLs that this public key posts to",
|
||||
)
|
||||
|
||||
@property
|
||||
def calc_email_md5(self):
|
||||
return md5(self.email.lower().encode("utf-8")).hexdigest()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue