Fixed PMC responses breaking messages and emptying the dialog window

This commit is contained in:
Dev 2024-11-02 20:37:26 +00:00
parent c7811f69cf
commit 0411430381

View File

@ -78,10 +78,7 @@ export class NotificationSendHelper {
*/
protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue {
// Use trader id if sender is trader, otherwise use nickname
const key =
senderDetails.Info.MemberCategory === MemberCategory.TRADER
? senderDetails._id
: senderDetails.Info.Nickname;
const key = senderDetails._id;
const dialogueData = this.saveServer.getProfile(sessionId).dialogues;
const isNewDialogue = !(key in dialogueData);
let dialogue: IDialogue = dialogueData[key];