From 0fb84294f0b59e2735a9df60662ca0bd8af8576c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A1n=20SDPC?= Date: Fri, 7 Dec 2018 17:51:34 +0100 Subject: [PATCH] Stop caching `forgotten` and `keyerror` properties (#667) * feat(device_receive): stop caching `forgotten` and `keyerror` properties After this change, the `forgotten` and `keyerror` properties as emitted by the Xiaomi Vima Smart Lock will stop being cached. Previously they were mostly useless, because after they were set to `true`, they were never being unset or set back to `false` upon a successful unlock. Close #666 * chore(device_receive): order uncached properties lexicographically As the list of uncached properties grows over time, it could be useful to order them lexicographically. This will make life easier to any developer looking for a particular property in the list, and in overall makes things look tidier. --- lib/extension/deviceReceive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extension/deviceReceive.js b/lib/extension/deviceReceive.js index 26dc2915b..debda5313 100644 --- a/lib/extension/deviceReceive.js +++ b/lib/extension/deviceReceive.js @@ -1,7 +1,7 @@ const settings = require('../util/settings'); const logger = require('../util/logger'); -const dontCacheProperties = ['click', 'action', 'button', 'button_left', 'button_right']; +const dontCacheProperties = ['action', 'button', 'button_left', 'button_right', 'click', 'forgotten', 'keyerror']; /** * This extensions handles messages received from devices.