Fix issue with trader ids not being propigated to the profile

This commit is contained in:
Dev 2023-07-22 13:59:21 +01:00
parent 00a2fbde22
commit ab912f519f

View File

@ -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;