cross-pod link handling improvement
Opened this issue · 2 comments
hello, i suggest a feature, i hope is very easy to implement:
diaspora has two kind of links:
-
pod.tld/posts/
shortnumber
(i think only digits) -
pod.tld/posts/
long generated hash
- this one contains digits and letters, i guess, is generated like cookie, we can be pretty sure it's unique.
that is why cross-pod links are based on this second kind of URL that represents the post.
so the cross-pod links are written in a way [desc](/posts/<long_generated_hash>)
then the diaspora handles them as cross-pod, shows you the link with your pod domain.
the improvement i suggest is very small: when encountering the diaspora link of second kind, with unique post identifier, independently of the pod, show it as cross-pod link. i. e. replace the domain with the current pod domain.
thank you!
Our vision is to replace links to posts with diaspora://<diasporaid>/posts/<guid>
on outbound and then on inbound try to fetch that post if missing and replace it back with a local link on render. I always get lost on the exact implementation status of this, maybe @SuperTux88 remembers better :)
The hard part will be to uneducate users about the /posts/
hack :D
If a post exist with a short /posts/.. link the attached PR can enhance this to full pod host uri.
Personally I never used the diaspora:// link. Users still have the choice