Fix name grant notification not being rendered

This commit is contained in:
Alex Gleason 2025-03-23 12:11:39 -05:00 committed by Chad Curtis
parent 44c7eb72a3
commit e7cb0075b7

View file

@ -98,14 +98,14 @@ async function renderReaction(store: NStore, event: DittoEvent, opts: RenderNoti
}; };
} }
async function renderNameGrant(event: DittoEvent) { function renderNameGrant(event: DittoEvent) {
const r = event.tags.find(([name]) => name === 'r')?.[1]; const r = event.tags.find(([name]) => name === 'r')?.[1];
const d = event.tags.find(([name]) => name === 'd')?.[1]; const d = event.tags.find(([name]) => name === 'd')?.[1];
const name = r ?? d; const name = r ?? d;
if (name) return; if (!name) return;
const account = event.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey); const account = event.author ? renderAccount(event.author) : accountFromPubkey(event.pubkey);
return { return {
id: notificationId(event), id: notificationId(event),