Subj : last_read and scan_ptr values To : Nightfox From : Digital Man Date : Sun Mar 29 2015 11:47 pm Re: last_read and scan_ptr values By: Nightfox to Digital Man on Sat Mar 28 2015 09:17 am > Re: last_read and scan_ptr values > By: Nightfox to Digital Man on Fri Mar 27 2015 22:49:47 > > Ni> If a new message is posted in a sub-board and that's the only message > Ni> in the sub-board, it seems that scan_ptr and last_read would point to > Ni> that message (is that correct?). If the currently logged-in user reads > Ni> that message, then scan_ptr and last_read would remain unchanged since > Ni> that's the only message in the sub-board. During a newscan, how can a > Ni> JavaScript script determine whether the user has read that message > Ni> (even if it wasn't written to the user - so the MSG_READ attribute > Ni> wouldn't be set)? > > I've done a little bit more testing this morning, and now I'm wondering if 0 > is a meaningful value for scan_ptr? If I post a new message in an empty > sub-board, it seems that the scan_ptr value for that sub-board is 0 until I > read the message I posted. Correct. Posting a message does not change any message pointers and the initial pointer value will be 0 (no message). > A related question is, will a message number > (the 'number' property in a message header) ever be 0? No. 0 is a special value indicating "no message". You can read about SMB message numbers here: http://synchro.net/docs/smb.html#Index File (*.SID) digital man Synchronet "Real Fact" #28: Rob Swindell first called BBSes (at 300bps) with an Apple II computer in 1982. Norco, CA WX: 61.1øF, 81.0% humidity, 2 mph SSE wind, 0.00 inches rain/24hrs .