From 0d85f0b2feece7f34f3f11f418372202a3f3493d Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Thu, 26 Jun 2025 08:35:03 +0100 Subject: [PATCH 1/2] fix(api): update lastvisit and retainedfrom defaultvalues --- api/src/chat/schemas/subscriber.schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/chat/schemas/subscriber.schema.ts b/api/src/chat/schemas/subscriber.schema.ts index ba3ea80a..1cfdbd68 100644 --- a/api/src/chat/schemas/subscriber.schema.ts +++ b/api/src/chat/schemas/subscriber.schema.ts @@ -90,13 +90,13 @@ export class SubscriberStub extends BaseSchema { @Prop({ type: Date, - default: () => Date.now() + 7 * 24 * 60 * 60 * 1000, + default: () => Date.now(), }) lastvisit?: Date; @Prop({ type: Date, - default: () => Date.now() + 7 * 24 * 60 * 60 * 1000, + default: () => Date.now(), }) retainedFrom?: Date; From d754a8bfe78e2def25861cbd46cdcfa1be32262f Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Thu, 26 Jun 2025 08:38:05 +0100 Subject: [PATCH 2/2] fix(api): update subscriber fixtures --- api/src/utils/test/fixtures/subscriber.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/utils/test/fixtures/subscriber.ts b/api/src/utils/test/fixtures/subscriber.ts index 22caa4a3..0e73ae73 100644 --- a/api/src/utils/test/fixtures/subscriber.ts +++ b/api/src/utils/test/fixtures/subscriber.ts @@ -23,8 +23,8 @@ export const subscriberDefaultValues: TSubscriberFixtures['defaultValues'] = { timezone: 0, assignedTo: null, assignedAt: null, - lastvisit: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), - retainedFrom: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), + lastvisit: new Date(), + retainedFrom: new Date(), avatar: null, context: { vars: {},