-
Notifications
You must be signed in to change notification settings - Fork 82
Rework Follower Structure #1759
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
base: trunk
Are you sure you want to change the base?
Conversation
This reverts commit e3e53b0.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Reworks the follower structure to rely on a unified Actor model rather than a distinct Follower model, simplifying internal handling and enabling reuse for extending functionality (e.g., followings).
- Migrates functionality from Followers to Actors and refactors tests accordingly.
- Updates and deprecates legacy methods to streamline actor/remote object management.
- Adjusts utility functions and scheduler methods to support the new data model.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/includes/model/class-test-follower.php | Updates tests to use Actors instead of Followers and simplifies error handling. |
tests/includes/handler/class-test-update.php | Refactors actor update tests to expect Actor objects and new retrieval methods. |
tests/includes/handler/class-test-move.php | Replaces legacy Follower functions with Actors ones for moving actors between profiles. |
includes/model/class-follower.php | Updates Follower methods to delegate saving and error management to the Actors class. |
includes/collection/class-followers.php | Deprecates certain methods in favor of their Actor counterparts and adjusts meta usage. |
includes/collection/class-actors.php | Introduces new methods for adding, updating, and retrieving remote Actor objects. |
includes/class-scheduler.php | Renames and updates scheduler methods to work with imported actors rather than followers. |
others (functions, migration, blocks, etc.) | Minor updates to remove Followers references and ensure consistency with the new Actor model. |
Rework follower structure to enable reuse of the pattern for the following mechanism.
This is the first major change to the follower structure, enabling the unified storage of "Remote Actors" — such as followers, followings, and mentioned actors. The first step is to migrate all generic functionality to the Actors collection and use the Followers collection solely to map an actor to a local user.
The next steps will be (further PRs):
Proposed changes:
Other information:
Testing instructions:
Changelog entry
Changelog Entry Details
Significance
Type
Message
Reworked follower structure to simplify handling and enable reuse for following mechanism.