From 0d9908a90f391a9453c7241485f413f6da26787c Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Tue, 25 Mar 2025 23:03:05 +0000 Subject: [PATCH] await to connect all sockets after register events --- .../src/cores/notifications/notifications.core.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/app/src/cores/notifications/notifications.core.js b/packages/app/src/cores/notifications/notifications.core.js index a9b92cc2..94504459 100755 --- a/packages/app/src/cores/notifications/notifications.core.js +++ b/packages/app/src/cores/notifications/notifications.core.js @@ -18,15 +18,19 @@ export default class NotificationCore extends Core { }, } + onRuntimeEvents = { + "wsmanager:all:connected": () => { + this.ctx.cores + .get("api") + .registerSocketListeners(this.listenSockets) + }, + } + public = { new: this.new, close: this.close, } - async onInitialize() { - this.ctx.cores.get("api").registerSocketListeners(this.listenSockets) - } - async new(notification) { NotificationUI.notify(notification) NotificationFeedback.feedback(notification)