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

    From Nightfox@VERT/DIGDIST to Digital Man on Saturday, June 18, 2022 10:25:02
    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
  • From Digital Man@VERT to Nightfox on Monday, June 20, 2022 20:12:07
    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
  • From Nightfox@VERT/DIGDIST to Digital Man on Monday, June 20, 2022 22:45:14
    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.

    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.

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

    Nightfox

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