Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federate community reports #5496

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

dullbananas
Copy link
Collaborator

@dullbananas dullbananas commented Mar 11, 2025

Closes #4897

@dullbananas dullbananas marked this pull request as ready for review March 18, 2025 04:23
}
})
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly use Either via get dependency in Cargo.toml:

activitypub_federation = { 
  git = "https://github.com/LemmyNet/activitypub-federation-rust.git", 
  branch = "object-either", 
  default-features = false, 
  features = [
  "actix-web",
] }

@@ -107,13 +107,57 @@ impl Object for SiteOrCommunity {
}
}

impl Actor for SiteOrCommunity {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also implemented Either for Actor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean this should come after LemmyNet/activitypub-federation-rust#139, or that its just something to keep in mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -107,13 +107,57 @@ impl Object for SiteOrCommunity {
}
}

impl Actor for SiteOrCommunity {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean this should come after LemmyNet/activitypub-federation-rust#139, or that its just something to keep in mind.

) -> LemmyResult<()> {
// admin action comes from the correct instance, so it was presumably done
// by an instance admin.
// TODO: federate instance admin status and check it here
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this would need to be skipped until we federate admins?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently assume that any user who is on the same instance as a user or community can perform admin actions on them. This is also in the existing code. It works fine because the remote Lemmy instance performs its own permission checks, and admin actions only federate for users/communities from the same instance.

@dessalines
Copy link
Member

Just needs above comments addressed, and conflicts, then we can merge.

@dullbananas dullbananas marked this pull request as draft March 25, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to report a community
3 participants