From abc450b48c709d7c4b739eeba1cfe9f0f7dd2bc1 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 9 Aug 2025 03:55:48 +0200 Subject: [PATCH 1/2] chore: improve handling of RJ interstitial missionInventoryUpdate InventoryJson should only be returned when going back to dojo, in which case RJ is also not present in the request anymore. --- src/controllers/api/missionInventoryUpdateController.ts | 8 +++++++- src/types/requestTypes.ts | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index 49eb6e1b..9113d44a 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -98,8 +98,14 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res) const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel); //TODO: figure out when to send inventory. it is needed for many cases. + if (missionReport.RJ) { + logger.debug(`railjack interstitial request, sending only deltas`, { + InventoryChanges: inventoryChanges, + AffiliationMods + }); + } res.json({ - InventoryJson: JSON.stringify(inventoryResponse), + InventoryJson: missionReport.RJ ? JSON.stringify(inventoryResponse) : undefined, InventoryChanges: inventoryChanges, MissionRewards, ...credits, diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index c9292fc4..51445b1e 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -148,6 +148,7 @@ export type IMissionInventoryUpdateRequest = { MultiProgress: unknown[]; }[]; InvasionProgress?: IInvasionProgressClient[]; + RJ?: boolean; ConquestMissionsCompleted?: number; duviriSuitSelection?: string; duviriPistolSelection?: string; -- 2.47.2 From 2c7a42d558595823a46663b094d4a6530d9a2463 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 9 Aug 2025 03:57:24 +0200 Subject: [PATCH 2/2] oops --- src/controllers/api/missionInventoryUpdateController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index 9113d44a..153ebcee 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -105,7 +105,7 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res) }); } res.json({ - InventoryJson: missionReport.RJ ? JSON.stringify(inventoryResponse) : undefined, + InventoryJson: missionReport.RJ ? undefined : JSON.stringify(inventoryResponse), InventoryChanges: inventoryChanges, MissionRewards, ...credits, -- 2.47.2