From 670ed860aa02010a746962f9d1b2a495a558b90d Mon Sep 17 00:00:00 2001 From: Kevin L'Hereec Date: Tue, 2 Jun 2026 18:16:16 +0200 Subject: [PATCH] feat: initialize lastPeriodicInformAt on BOOTSTRAP too --- app/controllers/cwmp_controller.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/cwmp_controller.ts b/app/controllers/cwmp_controller.ts index edd6993..3ed8201 100644 --- a/app/controllers/cwmp_controller.ts +++ b/app/controllers/cwmp_controller.ts @@ -175,7 +175,8 @@ export default class CwmpController { // Track last periodic inform timestamp const isPeriodic = events.some((e) => String(e).toUpperCase().includes('PERIODIC') || String(e) === '2') - if (isPeriodic) { + const isBootstrap = events.some((e) => String(e).toUpperCase().includes('BOOTSTRAP') || String(e) === '0') + if (isPeriodic || isBootstrap) { await DeviceModel.updateOne({ identifier: hashId }, { $set: { lastPeriodicInformAt: new Date() } }).catch(() => {}) }