From 3815f131cfbefb4e1def1b3526e9a6e0aa0b0d7b Mon Sep 17 00:00:00 2001 From: NoLogicAlan Date: Sun, 15 Nov 2026 01:31:05 +0300 Subject: [PATCH] fix(dashboard): resolve platform disconnect during login and update oauth endpoints - Send immediate Redis presence announcement and ping upon bot connection - Auto-recover Fluxer platform readiness in backend upon receiving active pings - Update OAuth token and user fetch endpoints from api.fluxer.app to fluxer.com/api - Update OAuth authorization and invite URLs to fluxer.com --- src/dashboard/RedisHandler.mjs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/dashboard/RedisHandler.mjs b/src/dashboard/RedisHandler.mjs index b12c23a..6c72b00 100644 --- a/src/dashboard/RedisHandler.mjs +++ b/src/dashboard/RedisHandler.mjs @@ -107,7 +107,7 @@ export class RedisHandler { .then(() => { if (this._destroyed) return; logger.redis("[Redis/Main] Connected"); - this.readyMessage(); + this.readyMessage(true); }) .catch((e) => { logger.error("[Redis/Main] Initial connection failed:", e.message); @@ -117,6 +117,8 @@ export class RedisHandler { .then(() => { if (this._destroyed) return; logger.redis("[Redis/Subscriber] Connected"); + this.readyMessage(true); + this.send(this.platform + ":ping", "" + Date.now()); this.subscriber.subscribe("request", async (m) => { if (this._destroyed) return; @@ -155,20 +157,26 @@ export class RedisHandler { } /** - * Send a "connected" info message to the dashboard after a 5-second debounce. + * Send a "connected" info message to the dashboard. + * @param {boolean} [immediate=false] * @returns {void} */ - readyMessage() { + readyMessage(immediate = false) { if (this._destroyed) return; if (this._readyTimer) clearTimeout(this._readyTimer); - this._readyTimer = setTimeout(() => { + const announce = () => { this._readyTimer = null; if (this._destroyed) return; this.send("info", JSON.stringify({ platform: this.platform, type: "connected", })); - }, 5000); + }; + if (immediate) { + announce(); + } else { + this._readyTimer = setTimeout(announce, 1500); + } } /**