@scrypted/client
Advanced tools
Comparing version 1.1.27 to 1.1.28
{ | ||
"name": "@scrypted/client", | ||
"version": "1.1.27", | ||
"version": "1.1.28", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/packages/client/src/index.js", |
@@ -6,2 +6,3 @@ import { RTCConnectionManagement, ScryptedStatic } from "@scrypted/types"; | ||
export interface ScryptedClientStatic extends ScryptedStatic { | ||
userId?: string; | ||
disconnect(): void; | ||
@@ -8,0 +9,0 @@ onClose?: Function; |
@@ -459,3 +459,7 @@ "use strict"; | ||
console.log('api queried, version:', version); | ||
const userDevice = Object.keys(systemManager.getSystemState()) | ||
.map(id => systemManager.getDeviceById(id)) | ||
.find(device => device.pluginId === '@scrypted/core' && device.nativeId === `user:${username}`); | ||
const ret = { | ||
userId: userDevice?.id, | ||
pluginRemoteAPI: undefined, | ||
@@ -462,0 +466,0 @@ connectionType, |
{ | ||
"name": "@scrypted/client", | ||
"version": "1.1.27", | ||
"version": "1.1.28", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/packages/client/src/index.js", |
@@ -40,2 +40,3 @@ import { RTCConnectionManagement, RTCSignalingSession, ScryptedStatic } from "@scrypted/types"; | ||
export interface ScryptedClientStatic extends ScryptedStatic { | ||
userId?: string; | ||
disconnect(): void; | ||
@@ -530,3 +531,8 @@ onClose?: Function; | ||
const userDevice = Object.keys(systemManager.getSystemState()) | ||
.map(id => systemManager.getDeviceById(id)) | ||
.find(device => device.pluginId === '@scrypted/core' && device.nativeId === `user:${username}`); | ||
const ret: ScryptedClientStatic = { | ||
userId: userDevice?.id, | ||
pluginRemoteAPI: undefined, | ||
@@ -533,0 +539,0 @@ connectionType, |
Sorry, the diff of this file is not supported yet
374410
3917