Skip to content

Ensure correct visibility handling for Undo and Follow requests #1988

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

Merged
merged 3 commits into from
Jul 23, 2025

Conversation

pfefferle
Copy link
Member

Make sure to retain the visibility settings of the original object when performing an Undo, and send Follow requests only to the platform where the followed account resides.

Proposed changes:

  • Preserve the visibility of the original Activity when sending an Undo.
  • Send Follow requests with private visibility.

Other information:

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

Testing instructions:

  • Go to '..'

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Ensure correct visibility handling for Undo and Follow requests

@pfefferle pfefferle self-assigned this Jul 23, 2025
@Copilot Copilot AI review requested due to automatic review settings July 23, 2025 09:20
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes visibility handling for ActivityPub Undo and Follow requests to ensure proper privacy controls. The changes preserve original activity visibility when undoing actions and set appropriate privacy levels for follow requests.

  • Preserve original activity visibility when creating Undo requests
  • Set Follow requests to use private visibility by default

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
includes/collection/class-outbox.php Retrieves and preserves original activity visibility when creating undo operations
includes/collection/class-following.php Sets follow requests to use private visibility constant

Copy link
Member

@obenland obenland left a comment

Choose a reason for hiding this comment

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

Nice catch!

@pfefferle pfefferle merged commit 0ce46de into trunk Jul 23, 2025
11 checks passed
@pfefferle pfefferle deleted the improve/visibility-handling branch July 23, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants