Skip to content

Commit

Permalink
Adopt orphaned items sent with the mail service (#1011)
Browse files Browse the repository at this point in the history
Sometimes items aren't received properly due to them not being parented
correctly in sendSystemMessageToPlayer, this aims to fix that.
  • Loading branch information
chompDev authored Dec 31, 2024
2 parents 63e7e6f + 39b95ac commit 90c6b62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion project/src/services/MailSendService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ export class MailSendService {

// Add items to message
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
}

Expand Down

0 comments on commit 90c6b62

Please sign in to comment.