Skip to content

Commit

Permalink
adding Loop as automated uploader (#3403)
Browse files Browse the repository at this point in the history
Loop is also an automated uploader of treatments.  Had an issue where temp basals set by Loop and uploaded to treatments were auto-snoozing BG alarms.  This should resolve.
  • Loading branch information
Kdisimone authored and sulkaharo committed May 18, 2018
1 parent f209ba5 commit 1b34887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plugins/treatmentnotify.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ function init() {
, pluginType: 'notification'
};

//automated treatments from OpenAPS shouldn't trigger notifications or snooze alarms
//automated treatments from OpenAPS or Loop shouldn't trigger notifications or snooze alarms
function filterTreatments (sbx) {
var treatments = sbx.data.treatments;

treatments = _.filter(treatments, function notOpenAPS (treatment) {
var ok = true;
if (treatment.enteredBy && treatment.enteredBy.indexOf('openaps://') === 0) {
if (treatment.enteredBy && treatment.enteredBy.indexOf('openaps://' || 'loop://') === 0) {
ok = _.indexOf(OPENAPS_WHITELIST, treatment.eventType) >= 0;
}
return ok;
Expand Down

0 comments on commit 1b34887

Please sign in to comment.