diff --git a/lib/plugins/treatmentnotify.js b/lib/plugins/treatmentnotify.js index 40216d97ace..be76b8cac5f 100644 --- a/lib/plugins/treatmentnotify.js +++ b/lib/plugins/treatmentnotify.js @@ -123,6 +123,11 @@ function init(ctx) { message = '...'; } + if (!eventType && lastTreatment.carbs && lastTreatment.insulin) eventType = "Meal Bolus"; + if (!eventType && lastTreatment.carbs) eventType = "Carb Correction"; + if (!eventType && lastTreatment.insulin) eventType = "Correcton Bolus"; + if (!eventType) eventType = "Note"; + const hash = crypto.createHash('sha1'); const info = JSON.stringify({ eventType, timestamp}); hash.update(info);