From a09c813358d71cbebb2c0ada47cc49fcc0a06bfc Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 22 Jul 2023 13:32:37 +0100 Subject: [PATCH] Add extra check for messages from traders where dialog type is defined --- project/src/services/MailSendService.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/project/src/services/MailSendService.ts b/project/src/services/MailSendService.ts index 4fa09d68..9a8f51ad 100644 --- a/project/src/services/MailSendService.ts +++ b/project/src/services/MailSendService.ts @@ -392,6 +392,12 @@ 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;