this post was submitted on 17 Apr 2024
4 points (83.3% liked)

Summit

735 readers
19 users here now

Community to discuss Summit, a Lemmy reader for Android.

App (Play Store): https://play.google.com/store/apps/details?id=com.idunnololz.summit

APK: https://github.com/idunnololz/summit-for-lemmy/releases

Patreon: https://patreon.com/SummitforLemmy

Ko-Fi: https://ko-fi.com/summitforlemmy

Website: https://summit.idunnololz.com/

founded 1 year ago
MODERATORS
 

When tapping on a URL in the post content that points towards a linked post, Summit leads to Page Not Found.

Post to test here. Tapping on the link roadmap for lemmy-ui-next in the post leads to Page Not Found.

top 4 comments
sorted by: hot top controversial new old
[–] idunnololz@lemmy.world 1 points 6 months ago (1 children)

Thanks for reporting this. I'll look into the issue later today.

[–] idunnololz@lemmy.world 1 points 6 months ago (1 children)

Ah I found the issue. The link you posted is https://next.lemm.ee/post/27522337 however the instance is not next.lemm.ee. The instance is lemm.ee. This is a bit challenging to handle since nothing prevents instances from being hosted on a subdomain so Summit has no idea if next.lemm.ee is the instance or lemm.ee. I'll look into how I could resolve this issue going forward.

[–] sunaurus@lemm.ee 2 points 6 months ago (1 children)

Hey! Do I understand correctly that your app is trying to fetch any /post/<id> directly from its source instance API? If so, I have a few ideas:

  1. If you detect anything that looks like a Lemmy post URL (<host>/post/<id>), you could first try to make a request to <host>/version, and only treat the post as a Lemmy post if you get a JSON response from that endpoint where .software.name === 'lemmy'. Otherwise, open that URL in the browser.
  1. The above will already "fix" the issue, but custom frontends on subdomains is actually quite common, so if you want to handle those links without resorting to a browser, then: in cases where <host>/version is not a Lemmy response, but <host> includes a subdomain, you could repeat the same logic from step 1 for the parent domain as well. If you detect a Lemmy API at the parent domain, then just use that to fetch the post.
[–] idunnololz@lemmy.world 2 points 6 months ago* (last edited 6 months ago)

Thank you for the suggestion! Not to worry I've already implemented a fix. It will go out in the next release.