fix: respect purchaseQuantity when giving gear items from inbox message (#960)
All checks were successful
Build / build (20) (push) Successful in 35s
Build / build (18) (push) Successful in 57s
Build Docker image / docker (push) Successful in 32s
Build / build (22) (push) Successful in 1m15s

Closes #942

Reviewed-on: #960
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
Sainan 2025-02-18 05:39:45 -08:00 committed by OrdisPrime
parent c8542c9d75
commit cd100c87b8

View File

@ -10,6 +10,7 @@ import {
import { getAccountIdForRequest } from "@/src/services/loginService";
import { addItems, getInventory } from "@/src/services/inventoryService";
import { logger } from "@/src/utils/logger";
import { ExportGear } from "warframe-public-export-plus";
export const inboxController: RequestHandler = async (req, res) => {
const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
@ -43,7 +44,10 @@ export const inboxController: RequestHandler = async (req, res) => {
if (attachmentItems) {
await addItems(
inventory,
attachmentItems.map(attItem => ({ ItemType: attItem, ItemCount: 1 })),
attachmentItems.map(attItem => ({
ItemType: attItem,
ItemCount: attItem in ExportGear ? (ExportGear[attItem].purchaseQuantity ?? 1) : 1
})),
inventoryChanges
);
}