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

Options for client.reactions.filter behave differently with server-side auth and client-side auth #545

Open
Luluno01 opened this issue Mar 9, 2023 · 0 comments

Comments

@Luluno01
Copy link

Luluno01 commented Mar 9, 2023

When trying to filter child reactions that a specific user made to a specific reaction, I use this code snippet:

const likes = (await client.reactions.filter({
  reaction_id: 'some-comment-id',
  filter_user_id: 'some-user-id',
  kind: 'like',
  limit: 1
}).results

I use filter_user_id (which is not documented anywhere by itself) here because I can't use reaction_id and user_id filters at the same time. The code snippet above works well only when the client is using server-side auth. When using client-side auth, however, the query result will be the latest child reaction of the specified reaction, instead of the specified user's child reaction of the specified reaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant