Subj : last_read and scan_ptr values
To : Digital Man
From : Nightfox
Date : Mon Mar 30 2015 10:10 am
> > Ni> If a new message is posted in a sub-board and that's the only
> > Ni> message in the sub-board, it seems that scan_ptr and last_read
> > Ni> would point to that message (is that correct?). If the
currently
> > Ni> logged-in user reads that message, then scan_ptr and last_read
> > Ni> would remain unchanged since that's the only message in the
> > Ni> sub-board. During a newscan, how can a JavaScript script
determine
> > Ni> whether the user has read that message (even if it wasn't
written
> > Ni> to the user - so the MSG_READ attribute 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)
Thanks - This confirms what I was wondering.
I understand that posting won't modify those pointers; maybe my question could
have been worded better in regards to that - I was referring to doing a
newscan after a new message had been posted by another user (and on my BBS, I
was testing a situation where a sub-board only has one message in it).
Nightfox
---
� Synchronet � Digital Distortion BBS - digitaldistortionbbs.com