Add nprofile property to profile model

This commit is contained in:
2025-04-30 12:21:51 +04:00
parent b7eccde9d0
commit 7aebcfc43f
3 changed files with 16 additions and 1 deletions

View File

@@ -59,6 +59,13 @@ export default class Profile {
return nip19.npubEncode(this.pubkey);
}
get nprofile(): string {
return nip19.nprofileEncode({
pubkey: this.pubkey,
relays: [config.relay_urls[0]],
});
}
get profileUrl(): string {
return `${config.base_url}/@${this.username}`;
}