mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-04 14:14:24 +01:00
Catch metadata when parsing
This commit is contained in:
@@ -111,7 +111,7 @@ async function parseMetadata(event: NostrEvent, signal: AbortSignal): Promise<vo
|
||||
if (event.kind !== 0) return;
|
||||
|
||||
// Parse metadata.
|
||||
const metadata = n.json().pipe(n.metadata()).safeParse(event.content);
|
||||
const metadata = n.json().pipe(n.metadata()).catch({}).safeParse(event.content);
|
||||
if (!metadata.success) return;
|
||||
|
||||
// Get nip05.
|
||||
|
||||
Reference in New Issue
Block a user