feat: pass root event for kind1 reposts

This commit is contained in:
kPherox 2023-02-16 18:11:36 +09:00
parent edabdedced
commit 8e5c9686df
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,10 @@ export default function Timeline({
return <ProfilePreview actions={<></>} pubkey={e.pubkey} className="card" />;
}
case EventKind.TextNote: {
const eRef = e.tags.find((a, i) => a[0] === "e" && a[3] === "mention" && e.content === `#[${i}]`)?.at(1);
if (eRef) {
return <NoteReaction data={e} key={e.id} root={parent.notes.find(a => a.id === eRef)} />;
}
return <Note key={e.id} data={e} related={related.notes} ignoreModeration={ignoreModeration} />;
}
case EventKind.ZapReceipt: {