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 handling URLs where username is not at the end of the path #94

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

louisbourque
Copy link
Contributor

Fixes #93

This PR fixes handling clicking the Follow button while on a URL that doesn't end with the user's username.

For example: https://mastodon.url/@username/with_replies

Instead of always using the 0th index, we search for the first occurrence of a path section that start with @, indicating this is the username.

@rugk
Copy link
Owner

rugk commented Dec 30, 2022

Hi @louisbourque,
first of all, thanks for your first contribution to this project! 🎉 👍 🏅
I hope you'll like this project and enjoy hacking on it… 😃

BTW: Next time, try to avoid doing a pull request from the master branch, because you can run into problems when you have a "non-clean" master that does not follow this repo here (i.e. "upstream"). See this article for details. Anyway, this is only a tip for the next time. 😃

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

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

The changes look good. Do you also want to add yourself to the CONTRIBUTORS.md file?

@louisbourque
Copy link
Contributor Author

Ah, interesting. I didn't realize the source branch name would make a difference. I don't do many PRs from forked repos. Thanks for the heads up.

Thanks for the offer, but I'm happy with only being in the git history. If I contribute more I'll add myself.

@rugk rugk merged commit b2f52a3 into rugk:main Mar 17, 2023
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.

Error in redirect when clicking Follow button from With Replies page (Mastodon v4)
2 participants