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

fix(twitter): respect routes to non-user pages #220

Merged

Conversation

leon-richardt
Copy link
Contributor

@leon-richardt leon-richardt commented Oct 7, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Fixes #140.

Commit message:

Prior to this commit, the Twitter user resolver attempted to resolve
pages such as
- twitter.com/home or
- twitter.com/explore
as a user page. This lead to 404s and 403s. With this commit, we define
a collection of known non-user pages that will not be considered as user
pages when encountered.

The list of pages was sourced by looking around the Twitter web
interface so it is probably not exhaustive. If you find additional
special pages, please append them to nonUserPages.

@leon-richardt leon-richardt force-pushed the fix/respect-twitter-special-routes branch 2 times, most recently from bd20ba8 to c798b47 Compare October 7, 2021 11:15
Prior to this commit, the Twitter user resolver attempted to resolve
pages such as
    - twitter.com/home or
    - twitter.com/explore
as a user page. This lead to 404s and 403s. With this commit, we define
a collection of known non-user pages that will not be considered as user
pages when encountered.

The list of pages was sourced by looking around the Twitter web
interface so it is probably not exhaustive. If you find additional
special pages, please append them to `nonUserPages`.
@leon-richardt leon-richardt marked this pull request as ready for review October 7, 2021 11:15
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I went ahead and added some simple tests @leon-richardt - please let me know if you think it looks good.

Upon your approval I will go ahead and merge this PR.

@leon-richardt
Copy link
Contributor Author

My apologies, it would have been good practice to add tests.

Your implementation looks good to me so it'd be fine to merge from my side 👍

@pajlada pajlada merged commit 93a265c into Chatterino:master Oct 10, 2021
@leon-richardt leon-richardt deleted the fix/respect-twitter-special-routes branch October 10, 2021 13:38
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.

Certain twitter links should be blacklisted from user searching
2 participants