• src/sbbs3/js_msgbase.c

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat May 22 21:44:37 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/4c2ec210bbee64521dd85b36
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix mime_version and content_type property names in JSDOCS

    Underscores are more JS friendly (and correct).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jul 10 22:58:26 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e53c5926508c739c27c4d67c
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Ignore the PRIVATE message attribute for the "mail" base

    When setting the value of a message's 'can_read' property, ignore the PRIVATE message attribute (which is sometimes set in FTN netmail messages) since it's assumed all messages in the mail base are private, no special destination (to) name matching is needed here.

    This only popped up recently via msglist.js because of the recent addition of checking each messages's 'can_read' property.

    As reported by <Diehard> via IRC PM.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 17 21:20:59 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/4f8f844f38f103e3f1ca4a4c
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix LAZY_BOOLEAN macro definition

    This is what was causing the 'is_utf8' message header property to be created as a Number instead of a Boolean.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Apr 21 22:09:52 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/1e62752ab8340af66f18f0b0
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Restore ability for MsgBase.open() to open an arbitrary SMB msgbase

    Before commit 5da26eca, you could pass Msgbase() the path to an SMB
    on the disk and open() it, no configuration needed. As of 2 years
    ago, I broke that, and passing a path to an SMB would open the "mail" base instead - most unexpected. This is a feature of smb_open_sub() which we switched to using (from smb_open()), so go back to using smb_open() when
    an unrecognized code is pass to the constructor.

    This has the negative consequence that the "mail" base can't be created
    via JS. Probably should fix that.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Apr 21 22:09:52 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/dc4b1bd9350a5581fa410c7f
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Use smb_open_sub() for the "mail" base too

    This restores the ability for JS MsgBase() to be used to create the
    initial mail message base properly, if needed.

    This means that the 'subnum' should now be equal to scfg.total_subs
    when referencing an arbitrary SMB via path (not in the configuration).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun May 8 11:31:19 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/323ff1e8198df77405409ab2
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Remember the last 'first_msg' property value after msgbase is closed

    The other msgbase property values are stored in the smb.status or other private_t members which retain their value when the message base is closed, unlike the 'first_msg' property which required a read of the message base index to get the value (and that doesn't work when the message base is closed, so would return 0).

    for deon (ALTERANT)

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Nov 19 17:02:14 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/6c5cb01c0979e74332c314e4
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix return return value when methods auto-open a message base (e.g. save_msg())

    js_open() sets the rval for the context (e.g. to JSVAL_TRUE), so we need to set it back to JSVAL_FALSE for failure conditions. Otherwise, the methods always return true even upon (save-msg) failure.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Wed Mar 29 12:52:05 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/fe14b001e563ea3b10c82cbf
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    MsgBase.save_msg() throw an exception when an empty recipient list is provided

    ... rather than just return false.

    This will make debugging this type of issue much easier in the future. sendmail.js was allowing empty recipient_list array arguments and the MsgBase .status was 0 and .error just an emtpy string - unhelpful.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Sun May 7 23:22:44 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/d5e8981d0631d766b37a061f
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    MsgBase.save_msg() docs says only one argument is required

    So use js_argc() to report an error if there's fewer than 1 argument, but
    don't just fail silently when 2 arguments are provided.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Mon May 8 18:07:50 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/de41e1b7a314ceaacfb6c321
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Use js_argc() to generate the helpful exception when insufficient args used

    ... rather than just failing silently with a special return value
    (e.g. false).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Aug 8 12:38:17 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/8fc08f0db09c8c8203657580
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Fix CID 508260: Null pointer dereference

    And really, more importantly, the msg header field_list array length would always be interpretted as 0-length!

    ... introduced in commit 54523145

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Nov 13 19:49:03 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/37ca25a5c73a308ae3e84006
    Modified Files:
    src/sbbs3/js_msgbase.c
    Log Message:
    Document the editor property (field) of the message header object

    there are still other undocumented fields/properties, but this one for sure
    was missing.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net