From 0f7a85db5946a0e6d53cffa45fc1f536d72593cc Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:56:51 -0700 Subject: [PATCH] chore(webui): sync account cheats between different webui tabs (#2863) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2863 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/controllers/custom/setAccountCheatController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/custom/setAccountCheatController.ts b/src/controllers/custom/setAccountCheatController.ts index 586cebb64..efd7f6c85 100644 --- a/src/controllers/custom/setAccountCheatController.ts +++ b/src/controllers/custom/setAccountCheatController.ts @@ -1,6 +1,6 @@ import { getInventory } from "../../services/inventoryService.ts"; import { getAccountIdForRequest } from "../../services/loginService.ts"; -import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import { sendWsBroadcastEx, sendWsBroadcastTo } from "../../services/wsService.ts"; import type { IAccountCheats } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; import { logger } from "../../utils/logger.ts"; @@ -20,6 +20,8 @@ export const setAccountCheatController: RequestHandler = async (req, res) => { res.end(); if (["infiniteCredits", "infinitePlatinum", "infiniteEndo", "infiniteRegalAya"].indexOf(payload.key) != -1) { sendWsBroadcastTo(accountId, { update_inventory: true, sync_inventory: true }); + } else { + sendWsBroadcastEx({ update_inventory: true }, accountId, parseInt(String(req.query.wsid))); } };