set summary.haveNoteLocally before caching summary

This commit is contained in:
Hazelnoot 2025-05-05 08:44:42 -04:00
parent 1a19301c90
commit 938e094a1a

View file

@ -137,12 +137,12 @@ export class UrlPreviewService {
summary.icon = this.wrap(summary.icon);
summary.thumbnail = this.wrap(summary.thumbnail);
this.previewCache.set(key, summary);
if (summary.activityPub) {
summary.haveNoteLocally = !! await this.apDbResolverService.getNoteFromApId(summary.activityPub);
summary.haveNoteLocally = !!await this.apDbResolverService.getNoteFromApId(summary.activityPub);
}
this.previewCache.set(key, summary);
// Cache 7days
reply.header('Cache-Control', 'max-age=604800, immutable');