-
Notifications
You must be signed in to change notification settings - Fork 81
Create a persistent Inbox #2009
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
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@obenland This should be ready to review now. |
Co-authored-by: Konstantin Obenland <[email protected]>
Condensed the add_action call in the Inbox class for improved readability and consistency.
Replaces get_by_guid with get method that requires both activity ID and user ID, ensuring inbox items are retrieved per user. Adjusts SQL query to filter by post_author for more accurate results.
@obenland added the user id to the getter. |
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
This PR introduces a global Inbox handler and persistence layer to log incoming ActivityPub Create and Update activities for debugging purposes.
- Adds a new Inbox collection to persist incoming Create and Update activities
- Introduces a global Inbox handler that processes and stores activities based on configurable filters
- Provides admin settings to enable/disable the inbox persistence feature
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
includes/handler/class-inbox.php | New global handler to filter and process incoming activities |
includes/collection/class-inbox.php | New collection class to persist activities as custom posts |
includes/class-activitypub.php | Registers the inbox post type and meta fields |
includes/wp-admin/class-settings.php | Adds the inbox persistence setting |
includes/wp-admin/class-advanced-settings-fields.php | Renders the inbox persistence admin field |
includes/functions.php | Updates is_activity_public to accept Base_Object instances |
includes/debug.php | Extends debug UI support to include inbox post type |
includes/class-handler.php | Initializes the new inbox handler |
tests/includes/handler/class-test-inbox.php | Test coverage for the inbox handler |
tests/includes/collection/class-test-inbox.php | Test coverage for the inbox collection |
.github/changelog/2009-from-description | Changelog entry |
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.
Let's
We should probably follow it up with a scheduled purge, similar to the Outbox.
This PR is primarily intended to log all incoming requests that start with Update and Create, to help debug whether all supported Activity types are being correctly processed.
Proposed changes:
Other information:
Testing instructions:
Changelog entry
Changelog Entry Details
Significance
Type
Message
A global Inbox handler and persistence layer to log incoming Create and Update requests for debugging and verifying Activity handling.