• webv4/lib/forum.js

    From echicken@VERT to Git commit to main/sbbs/master on Thu Feb 18 07:12:42 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/a6e8c33c9a4d063223246ab6
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    Improve getSubUnreadCount.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Thu Feb 18 20:08:14 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/1a470cc419f2305a2e1dc93a
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    Always set from_ext when posting a reply. Should resolve issue #221 (Mortifis).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Sun Feb 21 21:57:41 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/d9461016deb65a3baa216c88
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    listThreads can figure out the proper offset without some stupid
    extra param.

    Added getNewestMessagePerSub(grp) and getNewestMessageInSub(sub);
    these do pretty much what you would guess, although maybe not
    exactly because what is "message" anyway?

    Added 'guest' mode to getThreadStats, since some stats (votes)
    can be shown to guests, but others (unread messages) shouldn't.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Fri Feb 26 11:26:15 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/5f9b0a2d6877726f9918a7c2
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    Methods for XJS forum, and some cleanup.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Sat Mar 6 21:31:33 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/b0a76216a53f38128c45fd66
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    listSubs doesn't need to return that much detail. New stuff will be exported as part of 'forum' object, for use with require().

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Nov 15 00:36:36 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/ae16d34d42f38a4ad578372f
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    webv4: name thread cache temp files correctly, remove abandoned ones

    The temporary file a sub's thread cache is written to was named with format('%d', Date.now()), which overflows a 32-bit int, so every name
    carried -2147483648 and only the random suffix kept them apart. And a
    write that never finished (the request aborted, or the script was
    stopped mid-write) left its partial temp file in data/webv4/threads/ indefinitely.

    Name the file with the full millisecond time, and before writing a
    sub's cache, remove that sub's temp files older than 10 minutes. A
    complete rewrite of the largest sub measured takes about 10 seconds, so
    that age is never a write still in progress.

    Follows d7197cf656 (pushed-21-bodies, 2026-11-13). Part of #1339.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Nov 15 00:36:37 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/ec781cef7634cf0256c704c3
    Modified Files:
    webv4/lib/forum.js
    Log Message:
    webv4: take a poll's tally from the sub's threads, not every header

    getUserPollData() called get_all_msg_headers() on the whole sub to find
    one poll's tally, which get_msg_header() doesn't provide. A thread view
    does this for every poll it shows, so a page with 8 polls in a 5,145
    message sub spent 393 ms on it.

    The tally is now taken from getMessageThreads(), which caches it with
    the rest of the sub's threads. A thread view has already loaded those
    threads, so its polls reuse them: that page now spends 14 ms. The
    poll's other fields come from get_msg_header(). A poll that isn't in the threads (such as one older than max_messages) still falls back to
    reading every header.

    getUserPollData() now also requires that the user can read the sub, as getMessageThreads() does; before, any user could read the tally and
    answers of a poll in a sub they had no access to.

    Results were identical to the previous code for all 25 polls on a
    production install.

    Part of #1339.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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