-
-
Notifications
You must be signed in to change notification settings - Fork 916
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
base: main
Are you sure you want to change the base?
Federate community reports #5496
Conversation
…e or community, and add SiteOrCommunity::local_community
crates/apub/src/fetcher/report.rs
Outdated
} | ||
}) | ||
} | ||
} |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I published those changes as 0.6.4 now.
https://github.com/LemmyNet/activitypub-federation-rust/releases/tag/0.6.4
@@ -107,13 +107,57 @@ impl Object for SiteOrCommunity { | |||
} | |||
} | |||
|
|||
impl Actor for SiteOrCommunity { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Just needs above comments addressed, and conflicts, then we can merge. |
Closes #4897