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

Outbox: Don't federate Updates to unfederated posts. #1338

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

obenland
Copy link
Member

This will require some scrutiny. For example, this ignores changing content visibility in the Editor for old posts.
Not quite sure how to account for that in the callback, since post meta gets updated before transition_post_status runs and it's impossible to differentiate between a post with public visibility and one that doesn't have the post meta.

Proposed changes:

  • Bail before creating an Outbox item for update activities of unfederated posts.

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Import posts into your test site (they won't get Outbox items created for them or marked as federated).
  • Make an update to one of the imported posts.
  • Check the Outbox and make sure no Update activity was created.

@obenland obenland requested a review from a team February 18, 2025 18:00
@obenland obenland self-assigned this Feb 18, 2025
@pfefferle
Copy link
Member

Should we add an "older than x month" to the check?

@obenland
Copy link
Member Author

What would be the benefit of that?

@pfefferle
Copy link
Member

To prevent that an up-to-date post won't be federated when the Create get's "lost".

@obenland
Copy link
Member Author

Interesting, I've not considered that. We don't currently check for an existing Create, is that even applicable?

@pfefferle
Copy link
Member

pfefferle commented Feb 18, 2025

@obenland because all instances I tested so far, support Updates as a first Activity and handle them the same way as a Create, there was no need to have such a check.

@pfefferle
Copy link
Member

This is btw. nothing that can only happen to posts... we should also have a look at comments...

@obenland
Copy link
Member Author

Are those consuming instances or instances where there's a mix of federated and unfederated content? I'm trying to understand how that relates?

With this change we might want to introduce a way to explicitly federate a previously unfederated post. Could be an action link and/or bulk edit action in the posts list or something. I'd also be curious whether there's a way to determine whether a unfederated post had its activitypub visibility set to public, to change it that way

@pfefferle
Copy link
Member

pfefferle commented Feb 18, 2025

the problem is, that we decided to have "public" the default, so we do not store anything in the metas when a post should be federate as public! we can change that though.

but the side effect of that change would be, that posts that are written using a third party app wouldn't be federated.

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.

2 participants