h3poteto / megalodon

Fediverse API client library for node.js and browser
https://h3poteto.github.io/megalodon/
MIT License
250 stars 33 forks source link

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

Closed vivlim closed 3 weeks ago

vivlim commented 3 weeks ago

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.