Closed windowshater closed 7 months ago
plebbit.createVote({vote: 1})
does not increment the vote by 1, rather it sets the vote to 1. setting the vote to 1 multiple times does nothing.
an author's vote can be undefined, 0, 1 or -1. it can never be 2.
I see. But the seedit UI still not checking if I already upvoted or downvoted a specific post without using seedit.
I see. But the seedit UI still not checking if I already upvoted or downvoted a specific post without using seedit.
correct, the plebbit protocol at the moment has no way to fetch who upvoted a comment or not. the sub owner has this data themselves in their sub database, but does not share it because it would be too resource intensive. It only shares the current total upvotes and downvotes, not each individual vote.
so there's no way to sync the upvotes of an author between 2 devices, because there's no way to fetch votes. there's also no way to audit which authors voted on a post if you're not the sub owner.
we might add some auditing tools at some point, but it will be very slow to fetch, and wont update in real time, because it's just too much resources to share each votes. the current plebbit design makes some compromises to be able to fetch stuff fast and be infinitely scalable.
tldr if you vote once from a client using the same author, it wont show that you voted on another client. and if you vote again, it will do nothing, because you already voted and the sub owner db keeps track of that.
I'm testing plebbit-js to make upvotes without using the UI and I realized that seedit it is not checking if the user already upvoted a specific post:
If I try to upvote it the challenge will appear but even if I answer it, since I already voted, the votes counter will not increase, which is fine to avoid vote spamming. Here is the code that I'm using to vote: