@ray-js/lock-sdk 1.2.0-beta.16 → 1.2.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,7 +60,7 @@ export const getDeviceAdvancedAbilitiesForRuntime = async (rt) => {
|
|
|
60
60
|
if (rt.cache.deviceAdvanceAbilityCache) {
|
|
61
61
|
return rt.cache.deviceAdvanceAbilityCache;
|
|
62
62
|
}
|
|
63
|
-
const [productAbilitiesRes,
|
|
63
|
+
const [productAbilitiesRes, tttList] = await Promise.allSettled([
|
|
64
64
|
getProductAbilities(rt.config.devInfo.devId, [
|
|
65
65
|
"tyabi4ucx5",
|
|
66
66
|
"tyabis9tpe",
|
|
@@ -69,17 +69,13 @@ export const getDeviceAdvancedAbilitiesForRuntime = async (rt) => {
|
|
|
69
69
|
"tyabin4u5v",
|
|
70
70
|
"visual_door_lock_cloud_store",
|
|
71
71
|
]),
|
|
72
|
-
getDeviceAdvancedAbility(rt.config.devInfo.devId),
|
|
73
72
|
ipc.getTTTAbilityKeyList("isSupportedVRMode"),
|
|
74
73
|
]);
|
|
75
74
|
const productAbilities = productAbilitiesRes.status === "fulfilled" ? productAbilitiesRes.value : [];
|
|
76
|
-
const deviceAdvancedAbility = deviceAdvancedAbilityRes.status === "fulfilled"
|
|
77
|
-
? deviceAdvancedAbilityRes.value
|
|
78
|
-
: undefined;
|
|
79
75
|
const tttAbList = tttList.status === "fulfilled" ? tttList.value.abilityList : [];
|
|
80
76
|
const deviceAdvanceAbilityCache = {
|
|
81
77
|
cloudStorage: {
|
|
82
|
-
support:
|
|
78
|
+
support: false,
|
|
83
79
|
},
|
|
84
80
|
vr: {
|
|
85
81
|
support: false,
|
|
@@ -155,8 +151,6 @@ export const getDeviceAdvancedAbilitiesForRuntime = async (rt) => {
|
|
|
155
151
|
break;
|
|
156
152
|
}
|
|
157
153
|
case "tyabiwxrn9": {
|
|
158
|
-
deviceAdvanceAbilityCache.wechatVoip.support =
|
|
159
|
-
deviceAdvancedAbility?.types?.includes(1) ?? false;
|
|
160
154
|
deviceAdvanceAbilityCache.wechatVoip.isPublice =
|
|
161
155
|
data?.WechatType === "0";
|
|
162
156
|
if (!deviceAdvanceAbilityCache.wechatVoip.isPublice) {
|
|
@@ -186,6 +180,12 @@ export const getDeviceAdvancedAbilitiesForRuntime = async (rt) => {
|
|
|
186
180
|
console.warn(`setting [${item.abilityCode}] config error`, error);
|
|
187
181
|
}
|
|
188
182
|
});
|
|
183
|
+
getDeviceAdvancedAbility(rt.config.devInfo.devId).then((res) => {
|
|
184
|
+
deviceAdvanceAbilityCache.cloudStorage.support =
|
|
185
|
+
res.types?.includes(0) ?? false;
|
|
186
|
+
deviceAdvanceAbilityCache.wechatVoip.support =
|
|
187
|
+
res.types?.includes(1) ?? false;
|
|
188
|
+
});
|
|
189
189
|
rt.cache.deviceAdvanceAbilityCache = deviceAdvanceAbilityCache;
|
|
190
190
|
return deviceAdvanceAbilityCache;
|
|
191
191
|
};
|