FriendsOfFlarum / gamification

Add upvotes, downvotes, and ranks to your Flarum Community
https://discuss.flarum.org/d/20671-friendsofflarum-gamification
MIT License
36 stars 17 forks source link

Vote status on discussions list is incorrect on search results #118

Open rob006 opened 10 months ago

rob006 commented 10 months ago

Bug Report

I have enabled alternative layout with vote control on discussions list. When I use search, some discussions are displayed as voted even if I never voted for them. It looks like this indicator shows whether post author voted for his own discussion, not me.

Reverting this change in src/AddPostData.php fixes this issue:

https://github.com/FriendsOfFlarum/gamification/commit/80e7499fd02dd94e87ae819a0115ada2ad62f4dd#diff-dfd8aa62538bb3adafcc3b59fccee0e1b49d578146f36ade585858d08ff63da6

Screenshots

Discussions list (2 discussion are marked as voted by me):

1e8d7c1e

When enter these discussions, indicator changes: 8be766ce c1ee97b0