From 91780fdfbeb754191c9efba7ee2e59d07c201020 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Tue, 22 May 2018 13:08:15 +0300 Subject: [PATCH] [WebUI] Display smtp sender/recipient in history if it doesn't match From/To..Cc..Bcc --- interface/js/app/history.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/interface/js/app/history.js b/interface/js/app/history.js index dc44a2ddf..4fa3d9e07 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -171,7 +171,14 @@ function($, _, Humanize) { "value": scan_time }; item.id = item['message-id']; - item.rcpt_mime = item.rcpt_mime.join(",​"); + if (JSON.stringify(item.rcpt_smtp) !== JSON.stringify(item.rcpt_mime)) { + item.rcpt_mime = "[" + item.rcpt_smtp.join(",​") + "] " + item.rcpt_mime.join(",​"); + } else { + item.rcpt_mime = item.rcpt_mime.join(",​"); + } + if (item.sender_mime !== item.sender_smtp) { + item.sender_mime = "[" + item.sender_smtp + "] " + item.sender_mime; + } items.push(item); }); @@ -225,7 +232,7 @@ function($, _, Humanize) { } }, { "name": "sender_mime", - "title": "From", + "title": "[Envelope From] From", "breakpoints": "xs sm md", "style": { "font-size": "11px", @@ -233,7 +240,7 @@ function($, _, Humanize) { } }, { "name": "rcpt_mime", - "title": "To", + "title": "[Envelope To] To", "breakpoints": "xs sm md", "style": { "font-size": "11px", -- 2.39.5