When sharing on Sync, it always shares a link to whatever instance the community is on, or sometimes even the instance your home instance federated the post from, meaning I can be looking at a post from lemmy.world, from my home instance of lemmy.ca, and the share link will be from yiffit.net.
Is there a way to always share a post as coming from your home instance?
That is essentially what already happens, when you subscribe to a community from another instance, it creates a community on your instance with the same metadata (sidebar contents, icon, etc) and appends the
@instance.tld
suffix to the end of it. Your instance then sends a message to the original instance saying “Add me to your mailing list for posts/comments/votes/moderator actions for this community”. When you’re viewing comments and posts from a remote instance, you’re viewing the copy of it that your instance has (hence why post and comment IDs are not global - they are unique to your instance), its not fetched in real time.After one of those new actions gets added to the original community’s instance, it replicates that action to all instances that have at least one subscriber to the community. It also works in reverse, when you cast a vote, reply, etc your instance sends that action to the original one so that all (subscribed) instances have a copy of it.
If I were to say, block all IPs on my server except for my own IP, I’d still be able to view this post because my instance’s database has a copy of it, I just wouldn’t receive anything new on it. This has been noted as a potential issue for deleting data and following various regulations, because if you were to delete this comment after I took my server offline (or changed Lemmy’s code to not honor deletions), I’d still be able to see your comment because my instance never got the signal that you deleted it - there is no way to guarantee deletion of content on the Fediverse for this reason.
This is also why every now and then you get “vote drift” where the votes on comments and posts aren’t in sync, because the signal that a new vote was casted didn’t make it to your instance for some reason. Or if someone comments from an instance that yours is defederated from (but the original hosting instance isn’t defederated from) your instance won’t show those comments, but if you go to the original instance (or even the one from the instance that was defederated) it will show up.