Skip to content
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

Anonymous reactions override normal reactions with same ID #82

Open
dsevillamartin opened this issue Jan 13, 2024 · 0 comments
Open

Anonymous reactions override normal reactions with same ID #82

dsevillamartin opened this issue Jan 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dsevillamartin
Copy link
Member

Imagine you have two regular reactions in post_reactions with IDs 1, 2 and one anonymous reaction in post_anonymous_reactions with ID 1. If all are for the same post, the API returns all 3 reactions with the singular post_reactions type. This means two of the items have the same ID yet are different objects - one will be missing a user relationship & have a null userId. Since the anonymous reactions come last, the frontend overrides the original post_reaction of ID 1 with the "fake" (anonymous) one, thus making it seem like there are 2 anonymous votes instead of 1. This may break other stuff as well.

image
image
image

@dsevillamartin dsevillamartin added the bug Something isn't working label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant