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.icon = this.wrap(summary.icon);
|
||||||
summary.thumbnail = this.wrap(summary.thumbnail);
|
summary.thumbnail = this.wrap(summary.thumbnail);
|
||||||
|
|
||||||
this.previewCache.set(key, summary);
|
|
||||||
|
|
||||||
if (summary.activityPub) {
|
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
|
// Cache 7days
|
||||||
reply.header('Cache-Control', 'max-age=604800, immutable');
|
reply.header('Cache-Control', 'max-age=604800, immutable');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user