Closed brunofin closed 1 year ago
My initial testing on the backend didn't show the bug (see https://github.com/LemmyNet/lemmy/pull/3215), so maybe there's something happening between the frontend and the backend?
Thanks, I will do a Postman request later to double check, if it does come back correctly then I am afraid the issue must be in the JS library
Stale
I can confirm this, PostView
includes my_vote
only if you use /api/v3/post
. Using /api/v3/post/list
the field is missing. Looks like a bug in the db query.
This is great! Will save my client from making many unneeded requests now, can't wait for this to go online! Thank you!
On Mon, 23 Oct 2023, 6:40 pm Dessalines, @.***> wrote:
Closed #3197 https://github.com/LemmyNet/lemmy/issues/3197 as completed via 5bfa4e9 https://github.com/LemmyNet/lemmy/commit/5bfa4e9358cb10dc9e93d0dbdfca57b501a9a529 .
— Reply to this email directly, view it on GitHub https://github.com/LemmyNet/lemmy/issues/3197#event-10743459077, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5T7NNBHCNAT4K3ERVUGYDYA2MYZAVCNFSM6AAAAAAZL4647OVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG42DGNBVHEYDONY . You are receiving this because you authored the thread.Message ID: @.***>
Requirements
Summary
I am using
lemmy-js-client
to interact with the backend.I am trying to get the user's current vote status on a post from the aggregated posts response from the corresponding endpoint for the
getPosts
function defined in the js-client. The value there is alwaysnull
regardless of the post being upvoted or downvoted.If I go and use
getPost
to fetch that post specifically, the value atpost.post_view.my_vote
will return the proper value set in that post as1
,0
, or-1
.Steps to Reproduce
getPosts
. Search for post id and verifymy_vote
isnull
.getPost
and verifypost_view.my_vote
is1
.Technical Details
here's the log for the post object from
getPosts
:and here's the log for the post object from
getPost
:Version
BE: 0.17.4
Lemmy Instance URL
beehaw.org