Hi DM,
When using MsgBase.get_msg_header() with the include_votes parameter set to true, should the header have valid total_votes and upvotes properties? I've tried using get_msg_header() with the include_votes parameter set to true, with a message I know has upvotes, but it seems its total_votes and upvotes are 0. However, when I use get_all_msg_headers() and tell it to include votes, that message header has the expected values for total_votes and upvotes. I'm not sure if that's by design or if this is a bug.
My Synchronet binaries were built on November 11th.
When using MsgBase.get_msg_header() with the include_votes parameter set to
true, should the header have valid total_votes and upvotes properties?
I've tried using get_msg_header() with the include_votes parameter set to
true, with a message I know has upvotes, but it seems its total_votes and
upvotes are 0. However, when I use get_all_msg_headers() and tell it to
That's by design. In order to calculate a message's vote totals, the entire messagebase index must be read (and used). Voting on a messsage does not modify the message header of that message but creates a new message header that references the message being voted on. I think the MsgBase.get_index() method could be enhanced to calculate the votes and return the tally in its returned array of index objects, if that helps you (it doesn't do that currently).
Sysop: | Xerxes |
---|---|
Location: | Azle, Texas |
Users: | 131 |
Nodes: | 10 (0 / 10) |
Uptime: | 94:16:59 |
Calls: | 3,190 |
Calls today: | 1 |
Files: | 195 |
U/L today: |
0 files (0K bytes) |
D/L today: |
0 files (0K bytes) |
Messages: | 366,142 |
Posted today: | 0 |