Subj : MsgBase.put_msg_header() failing to save header
To : All
From : Nightfox
Date : Tue Aug 09 2016 09:05 pm
I have a message reader script for Synchronet that I've written in JavaScript.
I've written it so that when the user reads a message that was written to them,
it will mark the message as read (by setting the MSG_READ attribute). I'm
using the put_msg_header() function to save a header with that attribute, and
it seems there are some cases where put_msg_header() fails to save the header.
I am checking to ensure the message was written to the user, so I don't think
that would be the issue.. I did notice that one area where saving the header
is failing is a FidoNet area - I'm not sure if that matters though.
This is how I enable the read attribute (msgHeader is the message header
object):
msgHeader.attr |= MSG_READ;
I've tried calling put_msg_header a few different ways, using the message
number vs. message offset:
I tried the 3rd one since the first parameter is optional (according to the
Synchronet JS docs); I've also seen examples that omit the first parameter and
just use the message number. Where it fails, I will exit my message reader and
then read message again, and it thinks the message has not been read. I've
also seen put_msg_header() return false in that case.
Why might put_msg_header() fail?
Nightfox
---
� Synchronet � Digital Distortion: digitaldistortionbbs.com