-
Message header total_votes and upvotes properties
From
Nightfox@VERT/DIGDIST to
Digital Man on Tue Apr 23 20:35:02 2019
Hi DM,ããIn my message reader, I have it display the upvotes, downvotes, and score as header information above the message. It was usingãthe total_votes and upvotes properties of the message headers. Recently though, it seems those properties no longer exist in theãmessage header objects. Has something changed recently regarding those message header properties?ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Tue Apr 23 21:25:41 2019
Re: Message header total_votes and upvotes propertiesã By: Nightfox to Digital Man on Tue Apr 23 2019 08:35 pmãã > Hi DM,ã >ã > In my message reader, I have it display the upvotes, downvotes, and score asã > header information above the message. It was using the total_votes andã > upvotes properties of the message headers. Recently though, it seems thoseã > properties no longer exist in the message header objects. Has somethingã > changed recently regarding those message header properties?ããThose header properties are only calculated and added the header object whenãusing the MsgBase.get_all_msg_headers() method. Are you?ãã digital manããThis Is Spinal Tap quote #46:ã"Not an Exit" - we don't want an exit. Well that's true.ãNorco, CA WX: 66.0øF, 58.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Wed Apr 24 08:24:00 2019
Re: Message header total_votes and upvotes propertiesã By: Digital Man to Nightfox on Tue Apr 23 2019 09:25 pmãã >> In my message reader, I have it display the upvotes, downvotes, andã >> score as header information above the message. It was using theã >> total_votes and upvotes properties of the message headers. Recentlyã >> though, it seems those properties no longer exist in the messageã >> header objects. Has something changed recently regarding thoseã >> message header properties? ãã DM> Those header properties are only calculated and added the header objectã DM> when using the MsgBase.get_all_msg_headers() method. Are you?ããI am calling that, at least when I first enter a sub-board. I did a testãyesterday where I posted a message in one of my local sub-boards and thenãupvoted it, then exited out of my reader and ran my reader again, but it stillãwasn't showing the score for the message. It would show the score in theãpast, which was why I was wondering if something had changed recently in the JSãAPI. I'll have to double-check my reader code.ããAlso, when a user votes on a message, I wanted my reader to be able to re-fetchãjust that one header from the msgbase to get the up-to-date vote data. I'dãthink it might be inefficient to call get_all_msg_headers() to do that, but ifãa user votes on a message, perhaps my reader could calculate the difference inãup/downvotes (or poll vote) in that case?ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Wed Apr 24 13:11:42 2019
Re: Message header total_votes and upvotes propertiesã By: Digital Man to Nightfox on Tue Apr 23 2019 09:25 pmãã DM> Those header properties are only calculated and added the header objectã DM> when using the MsgBase.get_all_msg_headers() method. Are you?ããI see where the problem is. It's due to a recent update I made to my reader. ãI had started using the get_index() function, thinking it would be a faster wayãto filter vote messages out of the list of messages, and loading only theãnon-vote messages for display. I suppose I'll have to just useãget_all_msg_headers().ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Wed Apr 24 15:16:50 2019
Re: Message header total_votes and upvotes propertiesã By: Nightfox to Digital Man on Wed Apr 24 2019 01:11 pmãã > Re: Message header total_votes and upvotes propertiesã > By: Digital Man to Nightfox on Tue Apr 23 2019 09:25 pmã >ã > DM> Those header properties are only calculated and added the header objectã > DM> when using the MsgBase.get_all_msg_headers() method. Are you?ã >ã > I see where the problem is. It's due to a recent update I made to myã > reader. I had started using the get_index() function, thinking it would beã > a faster way to filter vote messages out of the list of messages, andã > loading only the non-vote messages for display. I suppose I'll have to justã > use get_all_msg_headers().ããWhen a message is voted on, the original message header is not modified - newãmessage headers are added and distributed over the message network(s). That'sãwhy get_all_msg_headers() is needed to tally the votes.ãã digital manããSynchronet "Real Fact" #22:ãThe second ever Synchronet BBS was the Mid-Nite Hacker BBS (sysop: The Zapper).ãNorco, CA WX: 81.2øF, 41.0% humidity, 17 mph NE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Wed Apr 24 15:49:01 2019
Re: Message header total_votes and upvotes propertiesã By: Digital Man to Nightfox on Wed Apr 24 2019 03:16 pmãã DM> When a message is voted on, the original message header is not modified -ã DM> new message headers are added and distributed over the message network(s).ã DM> That's why get_all_msg_headers() is needed to tally the votes.ããI see, thanks.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã