fix(server): only generate memories for past years

This commit is contained in:
Alex Tran 2025-02-27 21:39:08 -06:00
parent 5c879acd5b
commit 61ac256556

View File

@ -27,7 +27,7 @@ export class MemoryService extends BaseService {
userMap[user.id] = [user.id, ...partnerIds]; userMap[user.id] = [user.id, ...partnerIds];
} }
const start = DateTime.utc().startOf('day').minus({ days: DAYS }); const start = DateTime.utc().startOf('day').minus({ days: DAYS }).minus({ years: 1 });
const state = await this.systemMetadataRepository.get(SystemMetadataKey.MEMORIES_STATE); const state = await this.systemMetadataRepository.get(SystemMetadataKey.MEMORIES_STATE);
let lastOnThisDayDate = state?.lastOnThisDayDate ? DateTime.fromISO(state?.lastOnThisDayDate) : start; let lastOnThisDayDate = state?.lastOnThisDayDate ? DateTime.fromISO(state?.lastOnThisDayDate) : start;