Add blog_id to all notification messages (INTEGRA-49) #2989
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements INTEGRA-49 by adding
blog_id
to all notification messages sent to WPCOM endpoints. This enables the WPCOM notification proxy to properly work with the new client credentials authentication flow.Problem
The current notification system sends messages to WPCOM without including the
blog_id
in the message body. While theblog_id
is embedded in the URL endpoint, the WPCOM proxy system requires it in the message payload to properly route notifications in the client credentials authentication model.Solution
blog_id
property toNotificationsService
classJetpack_Options::get_option('id')
notify()
method to includeblog_id
in all notification message bodiesblog_id
in request verificationChanges Made
NotificationsService.php
$blog_id
property to store WordPress.com blog IDnotify()
method to includeblog_id
in message body alongsideitem_id
NotificationsServiceTest.php
blog_id
in request body verificationDUMMY_BLOG_ID
constant for test consistencyMessage Format Changes
Before:
After:
Affected Notification Types
This change affects all notification types automatically:
WPCOM Compatibility
The WPCOM counterpart already handles additional data in the request body:
This means the
blog_id
will be preserved and passed through to the notification processing logic.Test Plan
Impact
Related Issues
🤖 Generated with Claude Code