0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Adopt orphaned items sent with the mail service (#1011)

Sometimes items aren't received properly due to them not being parented
correctly in sendSystemMessageToPlayer, this aims to fix that.
This commit is contained in:
Chomp 2024-12-31 17:31:59 +00:00 committed by GitHub
commit 90c6b62814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,7 +174,10 @@ export class MailSendService {
// Add items to message // Add items to message
if (items.length > 0) { if (items.length > 0) {
details.items = items; const rootItemParentID = this.hashUtil.generate();
details.items = this.itemHelper.adoptOrphanedItems(rootItemParentID, items);
details.itemsMaxStorageLifetimeSeconds = maxStorageTimeSeconds ?? 172800; // 48 hours if no value supplied details.itemsMaxStorageLifetimeSeconds = maxStorageTimeSeconds ?? 172800; // 48 hours if no value supplied
} }