Improve npub rendering for profile updates

This commit is contained in:
thePR0M3TH3AN committed 2025-10-24 22:01:20 -04:00
1 parent f5cb3c4997
commit 6908c6d7f3
2 files changed
+55 -21

No files matched your search

+12 -2
View File
@@ -262,8 +262,18 @@ export class SimilarContentCard {
this.authorNpubEl.removeAttribute("title");
}
if (this.identity.pubkey) {
this.authorNpubEl.dataset.pubkey = this.identity.pubkey;
if (this.identity.npub) {
this.authorNpubEl.dataset.npub = this.identity.npub;
} else if (this.authorNpubEl.dataset?.npub) {
delete this.authorNpubEl.dataset.npub;
}
const resolvedPubkey =
this.identity.pubkey ||
(typeof this.video?.pubkey === "string" ? this.video.pubkey.trim() : "");
if (resolvedPubkey) {
this.authorNpubEl.dataset.pubkey = resolvedPubkey;
} else if (this.authorNpubEl.dataset?.pubkey) {
delete this.authorNpubEl.dataset.pubkey;
}