This commit is contained in:
Ren Amamiya
2023-07-25 08:09:26 +07:00
parent d30be10568
commit a1b93cdb72
11 changed files with 361 additions and 362 deletions

View File

@@ -21,7 +21,7 @@ export function useEvent(id: string, fallback?: string) {
embed.pubkey,
embed.kind,
embed.tags,
embed.content,
embed.content as unknown as string,
embed.created_at
);
return embed;
@@ -42,7 +42,7 @@ export function useEvent(id: string, fallback?: string) {
// @ts-ignore
event['content'] = parser(event);
}
return event as LumeEvent;
return event as unknown as LumeEvent;
} else {
throw new Error('Event not found');
}

10
src/utils/types.d.ts vendored
View File

@@ -1,9 +1,19 @@
import { NDKEvent, NDKUserProfile } from '@nostr-dev-kit/ndk';
export interface Content {
original: string;
parsed: string;
notes: string[];
images: string[];
videos: string[];
links: string[];
}
export interface LumeEvent extends NDKEvent {
event_id?: string;
parent_id?: string;
replies?: LumeEvent[];
content: Content;
}
export interface Account {