From 2ec94df4a2ab59b6947d0688506d386e3f3f62c4 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 18 Nov 2022 19:15:50 -0500 Subject: [PATCH] Include email address in mail display for local users because otherwise it breaks reply --- webcit-ng/static/js/user_profile.js | 4 ++-- webcit-ng/static/js/view_forum.js | 2 +- webcit-ng/static/js/view_mail.js | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/webcit-ng/static/js/user_profile.js b/webcit-ng/static/js/user_profile.js index 0d9eca432..19f19f432 100644 --- a/webcit-ng/static/js/user_profile.js +++ b/webcit-ng/static/js/user_profile.js @@ -7,8 +7,8 @@ // Inline display the author of a message. This can be called from many different views. // For messages originating locally, it renders the display name linked to their profile. // For messages originating locally, it renders the display name and their email address. -function render_msg_author(msg) { - if (msg.locl) { +function render_msg_author(msg, view) { + if ((msg.locl) && (view == views.VIEW_BBS)) { return( "" + msg.from diff --git a/webcit-ng/static/js/view_forum.js b/webcit-ng/static/js/view_forum.js index c800d4c43..9375f13c1 100644 --- a/webcit-ng/static/js/view_forum.js +++ b/webcit-ng/static/js/view_forum.js @@ -180,7 +180,7 @@ function forum_render_one(msg, existing_div) { + "
" // begin content + "
" // begin header + "" // begin header info on left side - + render_msg_author(msg) // author + + render_msg_author(msg, views.VIEW_BBS) // author + "" + string_timestamp(msg.time,0) + "" // end msgdate diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index d65a4246d..be4c1f97a 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -12,12 +12,12 @@ var RefreshMailboxInterval; // We store our refresh timer here // Render reply address for a message (FIXME we might want to figure out in-reply-to) function reply_addr(msg) { - if (msg.locl) { - return([msg.from]); - } - else { + //if (msg.locl) { + //return([msg.from]); + //} + //else { return([msg.from + " <" + msg.rfca + ">"]); - } + //} } @@ -42,7 +42,7 @@ function mail_render_one(msgnum, msg, target_div, include_controls) { + "
" // begin content + "
" // begin header + "" // begin header info on left side - + render_msg_author(msg) + + render_msg_author(msg, views.VIEW_MAILBOX) + "" + string_timestamp(msg.time,0) + "" // end msgdate @@ -431,4 +431,4 @@ function mail_send_message() { } }; request.send(body_text); -} \ No newline at end of file +} -- 2.39.2