Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Only return the approved widget capabilities instead of accepting all…
Browse files Browse the repository at this point in the history
… requested capabilities

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
  • Loading branch information
dhenneke committed Jan 3, 2022
1 parent 03f5a3c commit c1297eb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/stores/widgets/StopGapWidgetDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,11 @@ export class StopGapWidgetDriver extends WidgetDriver {
}
}

const allAllowed = new Set(iterableUnion(allowedSoFar, requested));

if (rememberApproved) {
setRememberedCapabilitiesForWidget(this.forWidget, Array.from(allAllowed));
setRememberedCapabilitiesForWidget(this.forWidget, Array.from(allowedSoFar));
}

return allAllowed;
return allowedSoFar;
}

public async sendEvent(
Expand Down

0 comments on commit c1297eb

Please sign in to comment.