iobroker.mywebui 1.37.51 → 1.37.53
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.
package/io-package.json
CHANGED
package/package.json
CHANGED
|
@@ -785,11 +785,13 @@ export class IobrokerHandler {
|
|
|
785
785
|
// Group check — server-side via sendTo (ioBroker DB-dən oxuyur, manipulate edilə bilməz)
|
|
786
786
|
if (visibilityConfig.groups && visibilityConfig.groups.length > 0) {
|
|
787
787
|
const username = this.userName || await this.connection.getCurrentUser();
|
|
788
|
-
const
|
|
788
|
+
const _timeout = new Promise(r => setTimeout(() => r({ visible: true, enabled: true }), 4000));
|
|
789
|
+
const _sendTo = this.connection.sendTo(
|
|
789
790
|
this.namespace,
|
|
790
791
|
'checkVisibility',
|
|
791
792
|
{ username, allowedGroups: visibilityConfig.groups, action: visibilityConfig.action || 'hide' }
|
|
792
793
|
);
|
|
794
|
+
const result = await Promise.race([_sendTo, _timeout]);
|
|
793
795
|
if (!result.visible || !result.enabled) {
|
|
794
796
|
return result;
|
|
795
797
|
}
|