Include email address in mail display for local users because otherwise it breaks...
authorArt Cancro <ajc@citadel.org>
Sat, 19 Nov 2022 00:15:50 +0000 (19:15 -0500)
committerArt Cancro <ajc@citadel.org>
Sat, 19 Nov 2022 00:15:50 +0000 (19:15 -0500)
webcit-ng/static/js/user_profile.js
webcit-ng/static/js/view_forum.js
webcit-ng/static/js/view_mail.js

index 0d9eca43275f5e3227d8357599fa2dc16db5dbc0..19f19f432d98edd529e54457aa64ac60dd5a50e4 100644 (file)
@@ -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(
                        "<span class=\"ctdl-username\" onClick=\"javascript:user_profile('" + msg.from + "');\">"
                        + msg.from
index c800d4c4390bb0b69e03a989e08768ba25dc4729..9375f13c14b3e68c2e69406cc73441623cf6bedb 100644 (file)
@@ -180,7 +180,7 @@ function forum_render_one(msg, existing_div) {
                + "<div class=\"ctdl-fmsg-content\">"                           // begin content
                + "<div class=\"ctdl-msg-header\">"                             // begin header
                + "<span class=\"ctdl-msg-header-info\">"                       // begin header info on left side
-               + render_msg_author(msg)                                        // author
+               + render_msg_author(msg, views.VIEW_BBS)                        // author
                + "<span class=\"ctdl-msgdate\">"
                + string_timestamp(msg.time,0)
                + "</span>"                                                     // end msgdate
index d65a4246d23f3cb295c838f6c3f2dfc77e2982e1..be4c1f97abf3ddcae66ea821230a6846a836e07f 100644 (file)
@@ -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 + " &lt;" + msg.rfca + "&gt;"]);
-       }
+       //}
 }
 
 
@@ -42,7 +42,7 @@ function mail_render_one(msgnum, msg, target_div, include_controls) {
                        + "<div class=\"ctdl-mmsg-content\">"                   // begin content
                        + "<div class=\"ctdl-msg-header\">"                     // begin header
                        + "<span class=\"ctdl-msg-header-info\">"               // begin header info on left side
-                       + render_msg_author(msg)
+                       + render_msg_author(msg, views.VIEW_MAILBOX)
                        + "<span class=\"ctdl-msgdate\">"
                        + string_timestamp(msg.time,0)
                        + "</span>"                                             // end msgdate
@@ -431,4 +431,4 @@ function mail_send_message() {
                }
        };
        request.send(body_text);
-}
\ No newline at end of file
+}