-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI bug on voting #300
Comments
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. |
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:
The text was updated successfully, but these errors were encountered: