Subj : Local messages, from_net_type is not NET_NONE
To   : Nightfox
From : Digital Man
Date : Wed May 13 2020 08:16 pm

 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