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

GoToSocial: fix getAccountFollowing failing because the final page omits a link header. #2223

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

vivlim
Copy link
Contributor

@vivlim vivlim commented Nov 2, 2024

urlToAccounts() appears to assume that the link header will continue to be present, but in my testing when I call getAccountFollowing(), the final page of accounts is completely missing the link header.
parseLinkHeader() throws if you pass an undefined header into it, so without this fix I'm effectively unable to use getAccountFollowing() on my GoToSocial instance.

…omits a `link` header.

urlToAccounts appears to assume that the link header will continue to be present, but in my testing it seems to go away on the last page. parseLinkHeader throws if you pass an `undefined` header into it.
@vivlim vivlim requested a review from h3poteto as a code owner November 2, 2024 07:59
Copy link
Owner

@h3poteto h3poteto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@h3poteto h3poteto merged commit 43bb7ac into h3poteto:master Nov 5, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants