Skip to content
Snippets Groups Projects
Commit ba919953 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'ddmsgreader_forward_edit_subject' into 'master'

DDMsgReader: When forwarding a message, the subject can now be edited before sending the message

Closes #528

See merge request !262
parents c8cd0993 c0f7272e
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!262DDMsgReader: When forwarding a message, the subject can now be edited before sending the message
...@@ -99,6 +99,8 @@ ...@@ -99,6 +99,8 @@
* 2023-02-24 Eric Oulashin Version 1.65 * 2023-02-24 Eric Oulashin Version 1.65
* Ctrl-C can now be used to cancel message scans. Output from the scan * Ctrl-C can now be used to cancel message scans. Output from the scan
* is now word-wrapped to the terminal width. * 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"; "use strict";
...@@ -204,8 +206,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a'); ...@@ -204,8 +206,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a');
   
   
// Reader version information // Reader version information
var READER_VERSION = "1.65"; var READER_VERSION = "1.66";
var READER_DATE = "2023-02-24"; var READER_DATE = "2023-03-02";
   
// Keyboard key codes for displaying on the screen // Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24); var UP_ARROW = ascii(24);
...@@ -14360,15 +14362,20 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) ...@@ -14360,15 +14362,20 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody)
   
var retStr = ""; var retStr = "";
   
console.print("\x01n"); console.attributes = "N";
console.crlf(); console.crlf();
console.print("\x01cUser name/number/email address\x01h:\x01n"); console.print("\x01cUser name/number/email address\x01h:\x01n");
console.crlf(); console.crlf();
var msgDest = console.getstr(console.screen_columns - 1, K_LINE); var msgDest = console.getstr(console.screen_columns - 1, K_LINE);
console.print("\x01n"); console.attributes = "N";
console.crlf(); console.crlf();
if (msgDest.length > 0) if (msgDest.length > 0)
{ {
// Let the user change the subject if they want
var subjPromptText = bbs.text(SubjectPrompt);
console.putmsg(subjPromptText);
var msgSubject = console.getstr(pMsgHdr.subject, console.screen_columns - console.strlen(subjPromptText) - 1, K_LINE | K_EDIT);
var tmpMsgbase = new MsgBase("mail"); var tmpMsgbase = new MsgBase("mail");
if (tmpMsgbase.open()) if (tmpMsgbase.open())
{ {
...@@ -14403,7 +14410,13 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) ...@@ -14403,7 +14410,13 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody)
} }
newMsgBody += "From: " + pMsgHdr.from + "\n"; newMsgBody += "From: " + pMsgHdr.from + "\n";
newMsgBody += "To: " + pMsgHdr.to + "\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 += "==================================\n\n";
newMsgBody += pMsgBody; newMsgBody += pMsgBody;
   
...@@ -14460,7 +14473,7 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) ...@@ -14460,7 +14473,7 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody)
// the message. The destination ("to" informatoin) will be filled in // the message. The destination ("to" informatoin) will be filled in
// according to the destination type. // according to the destination type.
var destMsgHdr = { to_net_type: NET_NONE, from: user.name, 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) if (user.netmail.length > 0)
{ {
destMsgHdr.replyto_net_addr = user.netmail; destMsgHdr.replyto_net_addr = user.netmail;
......
Digital Distortion Message Reader Digital Distortion Message Reader
Version 1.64 Version 1.66
Release date: 2023-02-09 Release date: 2023-03-02
by by
......
...@@ -5,6 +5,10 @@ Revision History (change log) ...@@ -5,6 +5,10 @@ Revision History (change log)
============================= =============================
Version Date Description 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 1.64 2023-02-09 When reading personal email (received or sent), as a
loadable module, now it can allow reading another user's loadable module, now it can allow reading another user's
mail (for the sysop when deleting a user account). mail (for the sysop when deleting a user account).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment