• Local messages, from_net_type is not NET_NONE

    From Nightfox@VERT/DIGDIST to Digital Man on Wed May 13 19:28:05 2020
    Hi DM,ããIn the past, while working on my message reader, I noticed that emails posted locally (from one local user to another) had a header with from_net_type of NET_NONE. Recently, after updating my Synchronet build, that seems to be no longer the case. In my message reader, when replying to an email, if from_net_type is not NET_NONE, I have my reader look for a from_net_addr to send the reply to. For local emails to me, from_net_type is not NET_NONE, but from_net_addr is empty, so it doesn't know the destination address.ããI was using a recent build, but tried updating to the latest to see if it changed, but I'm still seeing this issue. I'm using the nightly build from May 13th.ããWas this a change that was done by design?ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
  • From Digital Man@VERT to Nightfox on Wed May 13 20:16:39 2020
    Re: Local messages, from_net_type is not NET_NONEã By: Nightfox to Digital Man on Wed May 13 2020 07:28 pmãã > Hi DM,ã >ã > In the past, while working on my message reader, I noticed that emailsã > posted locally (from one local user to another) had a header withã > from_net_type of NET_NONE. Recently, after updating my Synchronet build,ã > that seems to be no longer the case.ããIf there's no from_net_addr field, then there should also be no from_net_type field. There was a bug recently fixed whereby the from_net_type field would be missing from MsgBase.get_msg_header() returned objects when the from_net_type was NET_NONE, unless the "expand fields" option was used.ãã > In my message reader, when replying toã > an email, if from_net_type is not NET_NONE, I have my reader look for aã > from_net_addr to send the reply to.ããIdeally, you'd look at the replyto_net_type/addr field first, but yeah, that's the basic algorithm.ãã > For local emails to me, from_net_typeã > is not NET_NONE, but from_net_addr is empty, so it doesn't know theã > destination address.ããThe from_net_type header field will be absent / undefined. So just checking if(hdr.from_net_type) is all you need to do as NET_NONE is 0. Both undefined and 0 evaluate to the same boolean result.ãã > I was using a recent build, but tried updating to the latest to see if itã > changed, but I'm still seeing this issue. I'm using the nightly build fromã > May 13th.ã >ã > Was this a change that was done by design?ããYes. http://cvs.synchro.net/cgi-bin/viewcvs.cgi/src/sbbs3/js_msgbase.cãã digital manããSynchronet "Real Fact" #8:ãSynchronet was originally intended as a replacement for WWIV BBS software.ãNorco, CA WX: 62.5øF, 68.0% humidity, 9 mph ESE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed May 13 22:28:33 2020
    Re: Local messages, from_net_type is not NET_NONEã By: Digital Man to Nightfox on Wed May 13 2020 08:16 pmãã DM> If there's no from_net_addr field, then there should also be noã DM> from_net_type field.ããAh. I had this line in my .js script (pMsgHdr is a message header passed in to the function):ãif (pMsgHdr.from_net_type != NET_NONE)ããI found from_net_type was undefined, but it was passing that condition (which makes sense, since it isn't NET_NONE), and from_net_addr was also undefined. So this was a case where from_net_type and from_net_addr were both undefined, as you have described. So I know what to fix. :)ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã