this post was submitted on 01 Jul 2023
17 points (100.0% liked)
Memmy - An iOS client for Lemmy
2536 readers
1 users here now
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This is something I'd love to do, but I need to figure out the best way to do it. I've never done one before, but I'm sure I could figure that part out.
My question is how do I actually know if something is a Lemmy link? Do I just see if the URL matches /c/.... or /u/....? This doesn't seem great because I'm sure other sites are using the same thing.
I could also do a bit deeper of a check, see if it's /u/something or even /u/something@something, but this would still be sketchy at best in my opinion.
If anyone has any ideas, I'll happily hear them out. It's something I want to do as well.
I was reading about a browser script that essentially does this; maybe you could get some ideas here
https://greasyfork.org/en/scripts/469273-lemmy-universal-link-switcher
Yup, looks like pretty much exactly what I was considering.
As a matter of fact, the idea of just having a preset list of instances looks really good too. What I might do is this:
We will see how it works out.
Would that json be something the community could contribute to?
The instance list? There are a few publicly available scripts to do this (actually you can visit https://memmy.app/instances.json to see how I'm retrieving the instance info for onboarding. I'm only retrieving a few of them right now while we wait on Apple to review the initial app).
Could just do the same thing for all instances and only retrieve the name and URL for them.