ring: remove push receiver token shim

This commit is contained in:
Koushik Dutta
2023-07-10 11:27:02 -07:00
parent 48cd3830a5
commit d7e8052498
3 changed files with 3 additions and 11 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/ring",
"version": "0.0.123",
"version": "0.0.124",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/ring",
"version": "0.0.123",
"version": "0.0.124",
"dependencies": {
"@koush/ring-client-api": "file:../../external/ring-client-api",
"@scrypted/common": "file:../../common",

View File

@@ -44,5 +44,5 @@
"got": "11.8.6",
"socket.io-client": "^2.5.0"
},
"version": "0.0.123"
"version": "0.0.124"
}

View File

@@ -82,10 +82,6 @@ class RingPlugin extends ScryptedDeviceBase implements DeviceProvider, Settings
],
defaultValue: 'Disabled',
},
pnc: {
hide: true,
json: true,
}
});
constructor() {
@@ -141,12 +137,8 @@ class RingPlugin extends ScryptedDeviceBase implements DeviceProvider, Settings
},
});
if (this.api.restClient.refreshToken && this.api.restClient.authConfig && this.settingsStorage.values.pnc)
this.api.restClient._internalOnly_pushNotificationCredentials = this.settingsStorage.values.pnc;
this.api.onRefreshTokenUpdated.subscribe(({ newRefreshToken }) => {
this.settingsStorage.values.refreshToken = newRefreshToken;
this.settingsStorage.values.pnc = this.api.restClient._internalOnly_pushNotificationCredentials;
});
}