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

getUserId and getCommunityId dont always find the user/community #116

Open
Ategon opened this issue Jan 21, 2024 · 2 comments
Open

getUserId and getCommunityId dont always find the user/community #116

Ategon opened this issue Jan 21, 2024 · 2 comments

Comments

@Ategon
Copy link

Ategon commented Jan 21, 2024

Due to how getUserId and getCommunityId try to find the id (using the search), if the actual user or community doesnt show up in that then it cant be found by the query

For example if you try to look for the id of the community [email protected]. Doing a call to getCommunityId("git") then does an api call to https://programming.dev/api/v3/search?q=git&type_=Communities which does not have git as one of the options (instead its populated by other things that have git in the name)

@Ategon
Copy link
Author

Ategon commented Jan 21, 2024

One way to solve it would be adding in functionality to check other pages of the search results rather than just the first

@SleeplessOne1917
Copy link
Owner

I've switched to making the bot actions closer to what lemmy-js-client does. getCommunityId and getUserId should be able to take names now in addition to ids. Try updating to 0.6.0 and seeing if the new functions help you resolve your issue.

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

2 participants