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

Bug: hashtags in posts from Akkoma or Pixelfed instances open as links instead of as hashtags #2260

Open
1 task done
maco opened this issue Feb 23, 2025 · 2 comments · May be fixed by #2261
Open
1 task done

Bug: hashtags in posts from Akkoma or Pixelfed instances open as links instead of as hashtags #2260

maco opened this issue Feb 23, 2025 · 2 comments · May be fixed by #2261
Labels
bug Something isn't working

Comments

@maco
Copy link
Contributor

maco commented Feb 23, 2025

Environment:

  • OS: 18.3.1
  • IceCubesApp version: 1.11.2

Description

Normally, if I see a post in my feed, and that post has a hashtag, and I tap the hashtag, I am taken to an in-app view of that hashtag. This is expected behavior.

If, however, that post I saw in my feed was posted from a pixelfed instance, Ice Cubes opens a web browser pointed at that other instance's hashtag search results.

Related Issues

  • Search that this bugs don't already exist before creating it.
@maco maco added the bug Something isn't working label Feb 23, 2025
@maco
Copy link
Contributor Author

maco commented Feb 23, 2025

Oh, I see why. This code has a comment saying that hashtags are detected thusly:

// OK this test looks weird but it's
// A 3 component path i.e. ["/", "tags", "tagname"]
// That is on the same host as the person that posted the tag,
// i.e. not a link that matches the pattern but elsewhere on the internet
// In those circumstances, hijack the link and goto the tags page instead

And the thing is, tag pages for Pixelfed have a different pattern. They are /discover/tags/:hashtag

For instance, my mastodon server is wandering.shop, and my pixelfed server is pix.lgbt. Using mastodon in the browser on wandering.shop and viewing the API calls that are made, such as this one, a hashtag I see in the content field of one of the results links to https://pix.lgbt/discover/tags/food?src=hash

@maco
Copy link
Contributor Author

maco commented Feb 23, 2025

And it seems Akkoma uses /tag/:hashtag (note tag singular, not plural) (I checked tapping a hashtag in a post made on genserver.social)

@maco maco changed the title Bug: tapping a hashtag opens browser to that instance's hashtag search if original post is from a pixelfed instance Bug: hashtags in posts from Akkoma or Pixelfed instances open as links instead of as hashtags Feb 23, 2025
maco added a commit to maco/IceCubesApp that referenced this issue Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant