feat: polish note component

This commit is contained in:
2024-01-12 13:56:20 +07:00
parent e0d4c53098
commit a9d10ff93b
16 changed files with 707 additions and 555 deletions

View File

@@ -267,10 +267,16 @@ export class Ark {
return event;
}
public getEventThread({ tags }: { tags: NDKTag[] }) {
public getEventThread({
content,
tags,
}: { content: string; tags: NDKTag[] }) {
let rootEventId: string = null;
let replyEventId: string = null;
if (content.includes("nostr:note1") || content.includes("nostr:nevent1"))
return null;
const events = tags.filter((el) => el[0] === "e");
if (!events.length) return null;