Prewarm cards only for kind 1

This commit is contained in:
Alex Gleason 2025-03-07 16:31:01 -06:00
parent f12cce9802
commit 413056e841
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -429,10 +429,12 @@ export class DittoRelayStore implements NRelay {
} }
private async prewarmLinkPreview(event: NostrEvent, signal?: AbortSignal): Promise<void> { private async prewarmLinkPreview(event: NostrEvent, signal?: AbortSignal): Promise<void> {
const { firstUrl } = parseNoteContent(stripimeta(event.content, event.tags), [], this.opts); if (event.kind === 1) {
const { firstUrl } = parseNoteContent(stripimeta(event.content, event.tags), [], this.opts);
if (firstUrl) { if (firstUrl) {
await unfurlCardCached(firstUrl, signal); await unfurlCardCached(firstUrl, signal);
}
} }
} }