diff --git a/xtrn/DDMsgReader/DDMsgReader.js b/xtrn/DDMsgReader/DDMsgReader.js index 6424c3e8a781e9f3a6143afa7e905e6c088ad6fd..72e275b781a9893e617fd491b93b4286554828d3 100644 --- a/xtrn/DDMsgReader/DDMsgReader.js +++ b/xtrn/DDMsgReader/DDMsgReader.js @@ -99,6 +99,8 @@ * 2023-02-24 Eric Oulashin Version 1.65 * Ctrl-C can now be used to cancel message scans. Output from the scan * is now word-wrapped to the terminal width. + * 2023-03-02 Eric Oulashin Version 1.66 + * Now allows editing the subject when forwarding a message */ "use strict"; @@ -204,8 +206,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a'); // Reader version information -var READER_VERSION = "1.65"; -var READER_DATE = "2023-02-24"; +var READER_VERSION = "1.66"; +var READER_DATE = "2023-03-02"; // Keyboard key codes for displaying on the screen var UP_ARROW = ascii(24); @@ -14360,15 +14362,22 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) var retStr = ""; - console.print("\x01n"); + console.attributes = "N"; console.crlf(); console.print("\x01cUser name/number/email address\x01h:\x01n"); console.crlf(); var msgDest = console.getstr(console.screen_columns - 1, K_LINE); - console.print("\x01n"); + console.attributes = "N"; console.crlf(); if (msgDest.length > 0) { + // Let the user change the subject if they want + var subjPromptText = bbs.text(SubjectPrompt); + console.putmsg(subjPromptText); + // Put the subject into the keyboard buffer to allow using the existing subject, and prompt for the subject + console.ungetstr(pMsgHdr.subject); + var msgSubject = console.getstr(console.screen_columns - console.strlen(subjPromptText) - 1, K_LINE); + var tmpMsgbase = new MsgBase("mail"); if (tmpMsgbase.open()) { @@ -14403,7 +14412,13 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) } newMsgBody += "From: " + pMsgHdr.from + "\n"; newMsgBody += "To: " + pMsgHdr.to + "\n"; - newMsgBody += "Subject: " + pMsgHdr.subject + "\n"; + if (msgSubject == pMsgHdr.subject) + newMsgBody += "Subject: " + pMsgHdr.subject + "\n"; + else + { + newMsgBody += "Subject: " + msgSubject + "\n"; + newMsgBody += "(Original subject: " + pMsgHdr.subject + ")\n"; + } newMsgBody += "==================================\n\n"; newMsgBody += pMsgBody; @@ -14460,7 +14475,7 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) // the message. The destination ("to" informatoin) will be filled in // according to the destination type. var destMsgHdr = { to_net_type: NET_NONE, from: user.name, - replyto: user.name, subject: "Fwd: " + pMsgHdr.subject }; + replyto: user.name, subject: "Fwd: " + msgSubject }; // pMsgHdr.subject if (user.netmail.length > 0) { destMsgHdr.replyto_net_addr = user.netmail; diff --git a/xtrn/DDMsgReader/readme.txt b/xtrn/DDMsgReader/readme.txt index 570a7a8340113f0c4359be7308aa740147391458..c46065c477c7c135f1a52c6ad7da94813c34a061 100644 --- a/xtrn/DDMsgReader/readme.txt +++ b/xtrn/DDMsgReader/readme.txt @@ -1,6 +1,6 @@ Digital Distortion Message Reader - Version 1.64 - Release date: 2023-02-09 + Version 1.66 + Release date: 2023-03-02 by diff --git a/xtrn/DDMsgReader/revision_history.txt b/xtrn/DDMsgReader/revision_history.txt index f34e163181c193a7688a0aee987c9e6af5fefc83..28bce74f39471717e7c7b4294820e18c85f85a70 100644 --- a/xtrn/DDMsgReader/revision_history.txt +++ b/xtrn/DDMsgReader/revision_history.txt @@ -5,6 +5,10 @@ Revision History (change log) ============================= Version Date Description ------- ---- ----------- +1.66 2023-03-02 When forwarding a message, the subject can now be edited + before sending the message +1.65 2023-02-24 Ctrl-C can now be used to cancel message scans. Output + from the scan is now word-wrapped to the terminal width. 1.64 2023-02-09 When reading personal email (received or sent), as a loadable module, now it can allow reading another user's mail (for the sysop when deleting a user account).