FIX: Pass event to timestamp context function in streamingMedia #1427
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.
Description
Updates media event manager to pass the
eventitself rather than itsxdmonly to the function created byinjectTimestampcontext.Related Issue
Jira bug report
Motivation and Context
When the
oneTimeAnalyticsReferrercontext was added, all contexts were updated to pass in the event directly rather than itsxdmobject; this allows contexts to update other elements of the event (eg thedatapayload in the case of the Analytics referrer) and to use the functions on the event (egmergeXdm) rather than replicate their functionality. However, this introduced a regression because the Media Event Manager, which uses a context function to add a timestamp, was not updated to pass the event rather than the xdm to that function. This is the only case in the repo where a context is used outside of the context module and seems to be necessary because these events do not use the event lifecycle.Screenshots (if appropriate):
N/A
Checklist:
pnpm changeset) or it is not necessary because this PR is not consumer-facing.