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

Merge branch 'DDMsgReader_forward_net_type' into 'master'

Bug fix for net type when forwarding messages to internet email or fidonet netmail

See merge request !43
parents cdec747c f7a723a9
No related branches found
No related tags found
No related merge requests found
// $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);
......@@ -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:
......
Digital Distortion Message Reader
Version 1.37
Release date: 2020-07-11
Version 1.38
Release date: 2020-11-26
by
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment