mlemgroup / mlem

Mlem for Lemmy
https://lemmy.ml/c/mlemapp
GNU General Public License v3.0
180 stars 31 forks source link

Display warning on community whose host instance no longer exists #1226

Open Sjmarf opened 3 months ago

Sjmarf commented 3 months ago

I just read this comment on Lemmy:

This is an issue with the way communities currently federated. If the host instance goes down, users can continue posting to their local versions of the community, blissfully unaware that their posts are no longer being federated.

One way to do this would be to check if the host instance is in the MlemStats.main.hosts set. If it isn't, we would attempt to contact the domain to double-check. If the domain is unreachable, display a warning that the server may be temporarily or permanently down. We should also replicate this warning in the "New Post" sheet, as the user can access the post composer without visiting CommuntiyView.

Sjmarf commented 2 months ago

This also applies to de-federated instances, actually. You can still post to communities on an instance that your instance de-federated from, but the post won't be sent properly. This is more difficult to do - possibly we could store a set of de-federated domains in the active UserSession to check this.