diff --git a/project/src/services/MailSendService.ts b/project/src/services/MailSendService.ts index 9a8f51ad..0010fbdc 100644 --- a/project/src/services/MailSendService.ts +++ b/project/src/services/MailSendService.ts @@ -382,9 +382,9 @@ export class MailSendService return this.systemSenderId; } - if (messageDetails.sender === MessageType.NPC_TRADER) + if (messageDetails.sender === MessageType.NPC_TRADER || messageDetails.dialogType === MessageType.NPC_TRADER) { - return messageDetails.trader; + return Traders[messageDetails.trader]; } if (messageDetails.sender === MessageType.USER_MESSAGE) @@ -392,12 +392,6 @@ export class MailSendService return messageDetails.senderDetails?._id; } - /** Dialog is from a trader, return trader */ - if (messageDetails.dialogType === MessageType.NPC_TRADER) - { - return messageDetails.trader; - } - if (messageDetails.senderDetails?._id) { return messageDetails.senderDetails._id;