mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Prewarm cards only for kind 1
This commit is contained in:
parent
f12cce9802
commit
413056e841
1 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue