-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add upvotes/downvotes #49
base: master
Are you sure you want to change the base?
Conversation
0f88f26
to
fab5634
Compare
bf6dcc2
to
731001f
Compare
@alopatindev thank you for this! I have very little time at the moment to review it, but I'll come back to it. I see you keep pushing commits, let me know when you think it's done |
Awesome! It's done. |
Why do you keep force pushing? |
That was a forgotten minor fix. I'm not going to force-push anything to this branch anymore, sorry if it's annoying or something. |
It's okay, I keep getting notifications but I asked because I didn't understand. When I click I see no changes in file changes and wondered why force push |
I'm not sure whether you're interested in this feature, but anyway, this adds upvotes/likes (
+
reactions) and downvotes/dislikes (-
reactions). Other reactions are ignored in the vote rating (because considering states like-
and at the same time 💩 is a bit complicated).If any user made several votes to a single message—all of the votes but the newest one will be ignored.
I didn't test it with the relays that don't support publishing reactions from free accounts.
Reactions are sent concurrently
Promise.allSettled
to the relays (but perhaps they should be sent the same way as comments publishing is done right now).I didn't manage to make markup properly.
Feel free to make any changes if you find this PR valuable for merging.