lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Lock communities and posts on defederated instances, prevent PMs to users

Open MrKaplan-lw opened this issue 6 months ago • 3 comments

Requirements

  • [x] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
  • [x] Did you check to see if this issue already exists?
  • [x] Is this only a feature request? Do not put multiple feature requests in one issue.
  • [x] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • [x] Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Users don't see when the community they're participating in or the user they're messaging is on a defederated instance. Their messages/posts/comments may get lost in the void, leading to a bad user experience.

Besides the usual case of defederations, this would also make it viable to use defederations for instances that are permanently shutting down (lemm.ee), to make it clear to anyone visiting their communities or user profiles that the instance is gone.

Describe the solution you'd like.

When an instance is defederated local users should no longer be able to interact with content in their communities or send PMs to their users.

Posts and comments in communities on the defederated instance should be blocked. Edits and deletions should be fine for redacting information. Community moderators may still be allowed to perform changes on the community itself. I don't have an opinion on how votes should be handled, there shouldn't be much impact from still accepting them anyway. This should be exposed through the API to be able to catch this already on the client side, which includes displaying a notice that the instance is defederated and therefore the community is read-only.

When sending a private message, this should also be rejected when the recipient is on a defederated instance. It should also be exposed at least on their user profile, which will allow clients to remove the button to send a PM and instead show a notification about the instance being defederated.

Describe alternatives you've considered.

Writing a script to change all communities on defederated instances to mod-only. Lock all posts in those communities. Create pinned posts in all those instances to explain that the instance is defederated. Possibly ban users on defederated instances or edit their profile descriptions to include this information.

Additional context

No response

MrKaplan-lw avatar Jun 16 '25 09:06 MrKaplan-lw

The first step for this would be changing Instance::read_or_create (and read() below) to join with federation_allowlist and federation_blocklist, and check if we are in blocklist mode (when allowlist is empty) or in allowlist mode. Based on that include a field like federation_allowed. This field can be checked in the UI, and in validation methods like check_community_user_action() etc.

Nutomic avatar Jun 16 '25 10:06 Nutomic

We essentially need a check_blocks function that checks person, communities, instance communities, instance persons, and federation blocks, for all the create / update actions.

There's something close here, but we need something more general.

Private message creation already checks person blocks, but not federation or instance_persons yet.

dessalines avatar Jun 16 '25 15:06 dessalines

It should probably be conveyed differently than just showing the lock icon and saying it's locked. A defederated community should probably have it's own symbol (like a stop or no-entry symbol) and its own warning text in the UI. It should be explicitly different than when the community is locked since it might confuse people if it isn't.

DraconicNEO avatar Jun 21 '25 22:06 DraconicNEO