jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

Deeplinks dont work if they are from an instance that is not the same as your instance in Jerboa

Open MV-GH opened this issue 2 years ago • 4 comments

Jerboa Version 0.40

Describe the bug Deep links dont work if you try to open a post that is not part of your main instance

To Reproduce Steps to reproduce the behavior: open this link with jerboa while not having lemmy.ml as main instance https://lemmy.ml/post/1956845 or use this one if you have lemmy.ml as home instance https://beehaw.org/post/3236895

As you can see it tried looking up the post (1956845) on lemmy.one because that is the instance from my account.

image Thus it couldnt find it and gives an empty screen

@dessalines @twizmwazin

Not sure how to fix this one, do i create a new API just for that new instance? if the host doesn't match? Even if then I don't actually see how to do this dynamically, in the sense that I code it once somewhere that it works then for all deeplinks.

MV-GH avatar Jul 16 '23 19:07 MV-GH

IMO post links having no context but a server post ID seems like a pretty major design flaw in lemmy itself. I hope perhaps in the future there is a good server side fix for it. Maybe a UUID for a post?

I don't think creating a new API instance is the right choice. Besides the complications you mentioned, the user would be logged out, and since Lemmy doesn't commit to any sort of backwards compatibility and we don't have a framework to implement support for multiple versions, compatibility would be a minefield. Opening a link in a custom tab or browser, while less integrated, at least accurately depicts to the user the amount of support we have for what they're doing.

twizmwazin avatar Jul 17 '23 00:07 twizmwazin

We can create an API instance without logging out the user and keep the current one. I did that in openLink fixes already. Regarding the compatibility: right now we can just assume they are supported as there have not been any non backwards compatible changes in the post api yet. But in the future once we have proper support for multiple versions we would have to check first if we support that instance. I do think its possible but it would require significant changes in each deeplink activity which would support it. I don't see a general solution just yet.

MV-GH avatar Jul 17 '23 01:07 MV-GH

When I said the user would be logged out, I meant in the new API instance for the linked server. So while the page would be viewable in the app, you wouldn't be able to interact with it, which unless clearly indicated would be a poor user experience.

twizmwazin avatar Jul 17 '23 16:07 twizmwazin

Ah yes indeed. This is much more complex than I initially thought.

MV-GH avatar Jul 17 '23 16:07 MV-GH