Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

To iterate is human, to recurse, divine. -- Robert Heller


dovenet / Synchronet Javascript / MsgBase.get_msg_header() not returning vote info for polls

SubjectAuthor
* MsgBase.get_msg_header() not returning vote info for pollsNightfox
`* MsgBase.get_msg_header() not returning vote info for pollsDigital Man
 `- MsgBase.get_msg_header() not returning vote info for pollsNightfox

1
MsgBase.get_msg_header() not returning vote info for polls

<62AE0A6E.3656.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=795&group=DOVE-Net.Synchronet_Javascript#795

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: MsgBase.get_msg_header() not returning vote info for polls
Message-ID: <62AE0A6E.3656.dove_sync_js@digitaldistortionbbs.com>
Date: Sat, 18 Jun 2022 03:25:02 -0700
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.19c-Linux master/402f4377f Jun 1 2022 GCC 9.4.0
X-FTN-CHRS: CP437 2
WhenImported: 20220618104937-0700 c1e0
WhenExported: 20220619211848-0700 c1e0
ExportedFrom: VERT sync-js 3723
WhenImported: 20220618102502-0700 c1e0
WhenExported: 20220618104922-0700 c1e0
ExportedFrom: DIGDIST dove_sync_js 3656
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Sat, 18 Jun 2022 10:25 UTC

Hi DM,

I just noticed this yesterday while doing some work on SlyVote.
SlyVote can display poll voting stats (for poll messages, it displays things like total_votes and information from the tally property in the message header). Currently, for poll votes, it's not getting any voting results. Even for polls that have been voted on, total_votes is 0 and it doesn't get any tally information. This is coming from MsgBase.get_msg_header() with the include_votes parameter as true.
I thought this was working at one point, but maybe not..?

Alternately, if I use MsgBase.get_all_msg_headers(true) (including the vote messages), it gets all the votes that way. Maybe that would be the better option anyway?

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

MsgBase.get_msg_header() not returning vote info for polls

<62B13707.3724.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=796&group=DOVE-Net.Synchronet_Javascript#796

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Nightfox
Subject: MsgBase.get_msg_header() not returning vote info for polls
Message-ID: <62B13707.3724.sync-js@vert.synchro.net>
Date: Mon, 20 Jun 2022 13:12:07 -0700
X-Comment-To: Nightfox
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <62AE0A6E.3656.dove_sync_js@digitaldistortionbbs.com>
References: <62AE0A6E.3656.dove_sync_js@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Linux master/dde8c68d0 Jun 14 2022 GCC 8.3.0
X-FTN-CHRS: CP437 2
WhenImported: 20220620201207-0700 c1e0
WhenExported: 20220620211840-0700 c1e0
ExportedFrom: VERT sync-js 3724
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Mon, 20 Jun 2022 20:12 UTC

Re: MsgBase.get_msg_header() not returning vote info for polls
By: Nightfox to Digital Man on Sat Jun 18 2022 10:25 am

> Hi DM,
>
> I just noticed this yesterday while doing some work on SlyVote.
> SlyVote can display poll voting stats (for poll messages, it displays things
> like total_votes and information from the tally property in the message
> header). Currently, for poll votes, it's not getting any voting results.
> Even for polls that have been voted on, total_votes is 0 and it doesn't get
> any tally information. This is coming from MsgBase.get_msg_header() with
> the include_votes parameter as true.
> I thought this was working at one point, but maybe not..?
>
> Alternately, if I use MsgBase.get_all_msg_headers(true) (including the vote
> messages), it gets all the votes that way. Maybe that would be the better
> option anyway?

Those properties are only populated when using the MsgBse.get_all_msg_headers() method. The get_msg_header() method just reads a single message header. All the message headers must read/parsed to find and total votes.
--
digital man (rob)

Sling Blade quote #14:
Karl Childers: Some folks call it a sling blade, I call it a kaiser blade.
Norco, CA WX: 82.7°F, 24.0% humidity, 7 mph S wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

MsgBase.get_msg_header() not returning vote info for polls

<62B15AEA.3661.dove_sync_js@digitaldistortionbbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=798&group=DOVE-Net.Synchronet_Javascript#798

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nightfox@VERT/DIGDIST (Nightfox)
To: Digital Man
Subject: MsgBase.get_msg_header() not returning vote info for polls
Message-ID: <62B15AEA.3661.dove_sync_js@digitaldistortionbbs.com>
Date: Mon, 20 Jun 2022 15:45:14 -0700
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: Digital Distortion
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <62B13707.3724.sync-js@vert.synchro.net>
References: <62B13707.3724.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Linux master/402f4377f Jun 1 2022 GCC 9.4.0
X-FTN-CHRS: CP437 2
WhenImported: 20220620230147-0700 c1e0
WhenExported: 20220621031842-0700 c1e0
ExportedFrom: VERT sync-js 3728
WhenImported: 20220620224514-0700 c1e0
WhenExported: 20220620230119-0700 c1e0
ExportedFrom: DIGDIST dove_sync_js 3661
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Nightfox - Mon, 20 Jun 2022 22:45 UTC

Re: MsgBase.get_msg_header() not returning vote info for polls
By: Digital Man to Nightfox on Mon Jun 20 2022 08:12 pm

>> things like total_votes and information from the tally property in the
>> message header). Currently, for poll votes, it's not getting any
>> voting results. Even for polls that have been voted on, total_votes is
>> 0 and it doesn't get any tally information. This is coming from
>> MsgBase.get_msg_header() with the include_votes parameter as true.

DM> Those properties are only populated when using the
DM> MsgBse.get_all_msg_headers() method. The get_msg_header() method just
DM> reads a single message header. All the message headers must read/parsed to
DM> find and total votes.

I don't remember now why I wasn't just using get_all_msg_headers()..
Thanks.

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor