diff --git a/xtrn/DDMsgReader/DDMsgReader.js b/xtrn/DDMsgReader/DDMsgReader.js index d6aa1cc209107dd4cc1b4fac5e04d2769c2bde49..da3332b5597ebb2bdf406da9e8c9ec9872856144 100644 --- a/xtrn/DDMsgReader/DDMsgReader.js +++ b/xtrn/DDMsgReader/DDMsgReader.js @@ -1,4 +1,4 @@ -// $Id: DDMsgReader.js,v 1.144 2020/07/11 23:07:46 nightfox Exp $ +// $Id: DDMsgReader.js,v 1.143 2020/05/23 23:30:28 nightfox Exp $ /* This is a message reader/lister door for Synchronet. Features include: * - Listing messages in the user's current message area with the ability to @@ -69,6 +69,10 @@ * Added mouse support to the scrollable reader interface. * The integrated area changer functionality doesn't have mouse * support yet. + * 2020-11-26 Eric Oulashin Verison 1.38 + * Bug fix: When forwarding a message, it now correctly + * sets the to_net_type property in the message header to + * FidoNet or internet for those types of message destinations */ @@ -180,8 +184,8 @@ if (system.version_num < 31500) } // Reader version information -var READER_VERSION = "1.37"; -var READER_DATE = "2020-07-11"; +var READER_VERSION = "1.38"; +var READER_DATE = "2020-11-26"; // Keyboard key codes for displaying on the screen var UP_ARROW = ascii(24); @@ -13303,7 +13307,7 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) return "Invalid message header given"; var retStr = ""; - + console.print("\1n"); console.crlf(); console.print("\1cUser name/number/email address\1h:\1n"); @@ -13356,9 +13360,13 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) var destMsgHdr = { to_net_type: NET_NONE, from: user.name, replyto: user.name, subject: "Fwd: " + pMsgHdr.subject }; if (user.netmail.length > 0) + { destMsgHdr.replyto_net_addr = user.netmail; + } else + { destMsgHdr.replyto_net_addr = user.email; + } //destMsgHdr.when_written_time = //destMsgHdr.when_written_zone = system.timezone; //destMsgHdr.when_written_zone_offset = @@ -13380,7 +13388,7 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) console.crlf(); destMsgHdr.to = msgDest; destMsgHdr.to_net_addr = msgDest; - destMsgHdr.to_net_type = NET_INTERNET; + destMsgHdr.to_net_type = netaddr_type(msgDest); } } else @@ -13430,6 +13438,7 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) console.print("\1n\1cForwarding to " + destUser.alias + "\1n"); console.crlf(); destMsgHdr.to_ext = destUser.number; + destMsgHdr.to_net_type = NET_NONE; } } } @@ -13472,6 +13481,54 @@ function DigDistMsgReader_ForwardMessage(pMsgHdr, pMsgBody) return retStr; } +function printMsgHdrInfo(pMsgHdr) +{ + if (typeof(pMsgHdr) != "object") + return; + + for (var prop in pMsgHdr) + { + if (prop == "to_net_type") + print(prop + ": " + toNetTypeToStr(pMsgHdr[prop])); + else + console.print(prop + ": " + pMsgHdr[prop]); + console.crlf(); + } +} + +function toNetTypeToStr(toNetType) +{ + var toNetTypeStr = "Unknown"; + if (typeof(toNetType) == "number") + { + switch (toNetType) + { + case NET_NONE: + toNetTypeStr = "Local"; + break; + case NET_UNKNOWN: + toNetTypeStr = "Unknown networked"; + break; + case NET_FIDO: + toNetTypeStr = "FidoNet"; + break; + case NET_POSTLINK: + toNetTypeStr = "PostLink"; + break; + case NET_QWK: + toNetTypeStr = "QWK"; + break; + case NET_INTERNET: + toNetTypeStr = "Internet"; + break; + default: + toNetTypeStr = "Unknown"; + break; + } + } + return toNetTypeStr; +} + // For the DigDistMsgReader class: Lets the user vote on a message // // Parameters: diff --git a/xtrn/DDMsgReader/readme.txt b/xtrn/DDMsgReader/readme.txt index 40441f125b3de7a50c13417c5e7c5a5fe12f6bd3..b686c334cb9dabdf15b2dcad5015e204b4034805 100644 --- a/xtrn/DDMsgReader/readme.txt +++ b/xtrn/DDMsgReader/readme.txt @@ -1,6 +1,6 @@ Digital Distortion Message Reader - Version 1.37 - Release date: 2020-07-11 + Version 1.38 + Release date: 2020-11-26 by diff --git a/xtrn/DDMsgReader/revision_history.txt b/xtrn/DDMsgReader/revision_history.txt index d09a21e96a68059bb6c1da4f2917ba7059324907..03796ef04477f4ab8a0d067f70f7b465de7a69dc 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.38 2020-11-26 Bug fix: When forwarding a message, it now correctly sets + sets the to_net_type property in the message header to + FidoNet or internet for those types of message + destinations 1.37 2020-07-11 Added mouse support to the scrollable reader interface. The integrated area changer functionality doesn't have mouse support yet.