I know this is more of a QoL type of feature, but down the road it would be nice to possibly have a safari extension for Lemmy links. It’s annoying to click on a link, and for it to go to the website instead of memmy. I don’t know if it’s possible, because I think Apollo hijacked the reddit open in app link. BUTTTT 🤞🏻 🤞🏻🤞🏻hopefully it’s possible
My understanding is that this is possible under iOS. Hopefully the devs get the app to the point where it’s stable enough to focus smaller side tasks like this. :)
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.
Sadly I don’t know a thing about swift/obj-c or even any coding at all. I did find this though, and I hope it’s something useful: Apple Doc
Unfortunately the thing about this is that it requires you have access to the server. You have to add a site association to your web server which wouldn’t work in this case. I could possibly do something with an extension though that redirects you from that site to memmy.app which would then open the app.
The problem still though is how to actually identify a link. Just checking for /u/ or /c/ is unreliable. /post/ is slightly more reliable but I still feel like it might not be. I’d need to see how many popular services are using something like that.
Extension finds links that contain /post/somet
I’ll just drop this since I’m not sure if it would help at all: Apollo ,and it looks like he was redirecting through openinapollo.com. So it does look like it would redirect through memmy.app for you.
I see what you’re talking about with the multiple servers, and that would definitely be a head scratcher. Since you’re definitely better at this, I guess I’ll leave that for you or someone else in the community to figure out :(
I have some ideas. There’s comment somewhere else in this thread I just made. We will experiment with this one of these days.
I’m already running a server for this, so hosting isn’t an issue at all 🖖
Oh hi, thanks for the app! Since you’re here, might I suggest messing around with the ‘up/downvote’ slide animation? I dunno why, but it feels almost…sluggish compared to Apollo as the vote arrow goes back into place.
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:
- Maintain a list of instances at https://memmy.app/allInstances.json
- You press a link that contains /post/, Memmy communicates with Memmy.app to retrieve that list
- Try to retrieve the post from the instance it is on (looks like the script uses the same idea that I figured would be correct, which is to just use the /post endpoint)
- Send a search request to your instance with that post title and username as that user
- Redirect you to that post
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.
Oh, the script includes a list of known instances that would need to be maintained. I was hoping it was smarter somehow.
Could Opener handle this on iOS?
https://apps.apple.com/us/app/opener-open-links-in-apps/id989565871
Do you own it to try it out? If not I’m willing to buy it and if it doesn’t work I’ll refund it.
I have Opener, but it looks like the dev of it needs to manually add Memmy to the list first before I can try to use it to open links