jeffalo / my-ocular

backend for ocular
https://ocular.jeffalo.net/docs/about#what-iswas-my-ocular
9 stars 10 forks source link

Starring your own posts causes it appears twice #16

Closed Samq64 closed 3 years ago

Samq64 commented 3 years ago

Describe the bug When I view my starred posts ocular at https://ocular.jeffalo.net/starred, all of the posts that were written by me appear twice in a row.

To Reproduce

  1. Star onw of your own posts.
  2. Go to 'https://ocular.jeffalo.net/starred'
  3. Notice how all the posts written by you appear twice.

Expected behaviour When someone stars their own post, it should only appear once.

Screenshots Screenshot 2021-06-08 120438

Screenshot 2021-06-08 120230

OS and Browser:

jeffalo commented 3 years ago

oh no my worst nightmare... race conditions

jeffalo commented 3 years ago

so the issue is around https://github.com/jeffalo/my-ocular/blob/d32e56b9b7814dd84deac755e5dbae1c0736cc1c/index.js#L171-L198 i think i just need to move the check a bit higher. i wonder if reactions are also affected.

return-misaPuding commented 3 years ago

No, they aren't (at least for me)

Dne út 8. 6. 2021 19:35 uživatel jeffalo @.***> napsal:

so the issue is around

https://github.com/jeffalo/my-ocular/blob/d32e56b9b7814dd84deac755e5dbae1c0736cc1c/index.js#L171-L198 i think i just need to move the check a bit higher. i wonder if reactions are also affected.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jeffalo/my-ocular/issues/16#issuecomment-856960923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ2EEUN7V7J73GGYLBQPZ4TTRZIGHANCNFSM46KMUM7Q .

FunctionalMetatable commented 3 years ago

cannot repro

jeffalo commented 3 years ago

fixed in 669d9d9c8b4aded1f7864d181d1c92854831addb