set summary.haveNoteLocally before caching summary
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user