From baf1b2e9876e81ab163b6964f8e26fb5d70f48a9 Mon Sep 17 00:00:00 2001 From: Brett Hoerner Date: Fri, 26 Apr 2024 08:54:27 -0600 Subject: [PATCH] fix(plugin-server): add time component to person.force_upgrade --- plugin-server/src/worker/ingestion/person-state.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin-server/src/worker/ingestion/person-state.ts b/plugin-server/src/worker/ingestion/person-state.ts index 7d605bc7070926..0c2c88e60156d6 100644 --- a/plugin-server/src/worker/ingestion/person-state.ts +++ b/plugin-server/src/worker/ingestion/person-state.ts @@ -112,8 +112,10 @@ export class PersonState { // Ensure person properties don't propagate elsewhere, such as onto the event itself. person.properties = {} - // See documentation on the field. - person.force_upgrade = true + if (person.created_at.diff(this.timestamp).as('hours') > 1) { + // See documentation on the field. + person.force_upgrade = true + } return person }