IceCubesApp
IceCubesApp copied to clipboard
Bug: hashtags in posts from Akkoma or Pixelfed instances open as links instead of as hashtags
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
- [x] Search that this bugs don't already exist before creating it.
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
And it seems Akkoma uses /tag/:hashtag (note tag singular, not plural) (I checked tapping a hashtag in a post made on genserver.social)