Closed pfefferle closed 8 months ago
I've seen this in Tusky on Mastodon, was assuming it tried to maybe fetch an activitypub+json
representation of the URL first. When I again click the link, it opens a browser window (on my Android phone), no infinite loop. But I also typically configure apps to never open links in the "in-frame" browser or whatever it's called.
One "solution" to this might be ... not showing a permalink in the post itself? I mean, I know this isn't actually a solution, but Mastodon statuses are also web pages, and they don't display a URL as part of their post content (yet you can still click "open in browser" for them).
(I like the idea of explicitly showing a permalink, as it raises awareness that "regular" web sites can also be ActivityPub servers, etc.)
Meanwhile, I think it's up to apps to fix this themselves.
In the furture, maybe related https://github.com/mastodon/mastodon/pull/26917 for implementation in Mastodon itself? See discussion https://hachyderm.io/@thisismissem/111076105053359483 https://mastodon.social/@aslakr/111092724148991855 etc.
From that link:
Mobile apps like Tusky and Toot! take advantage of the search API to check all tapped links in posts for potentially being posts or profiles, and if so, opening them in-app.
This is exactly what I tried to describe :-)
Looks like this might not exactly solve this issue, though, and possibly even add to the problem? Unless I read it wrong. Still interesting to follow, however.
Unless clients become better at recognising that the post contains links to itself, I suspect it will add to the problem.
I guess solutions might be:
Clients should have better interface on how to open the original page. In that case it might not be necessary to have links to itself in posts.
The links in posts don't respond with activitypub+json
. How would that work if/when WordPress redirect to canonical url?
The clients should recognise that links in posts contains links to itself.
One "solution" to this might be ... not showing a permalink in the post itself? I mean, I know this isn't actually a solution, but Mastodon statuses are also web pages, and they don't display a URL as part of their post content (yet you can still click "open in browser" for them).
Unfortunately, I don't think it is one since the link is required to backfeed comments to the blog via webmention.
I was thinking about adding a parameter to disable the return of the application/activity+json
accept header, or maybe make Mastodon support link targets (<a href="" target="_blank" />
).
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Quick summary
This issue was originally filed on the Mastodon repo: https://github.com/mastodon/mastodon-android/issues/739
I think with the new feature in the official Mastodon Apps, that try to open links in the App directly (which I like, because it should bring more interaction to the site (comments, likes, boosts, ...)), we need a way to prohibit that for the links we add via the "Post content" settings, to not have an infinite loop (see video in the Mastodon issue).
Steps to reproduce
What you expected to happen
The App should load the URL in the default browser instead.
What actually happened
It results in an infinite loop.
Impact
Some (< 50%)
Available workarounds?
Yes, easy to implement
Logs or notes
No response