Repository navigation
EMAIL-1739 Add EmailFwdr external, expose raw on EmailMessage - #8540
Merged
Merged
Conversation
Add JsValue.External.emailFwdr, a capability wrapper for the EmailFwdr that an inbound email event carries for forward() and reply(). EmailMessage and ForwardableEmailMessage are implemented outside workerd, so the capability is opaque here. It is classified as ineligible for replay, like the other capability-backed externals. Move `raw` from ForwardableEmailMessage up to EmailMessage in the public typings, and regenerate the type snapshots. A worker that receives an EmailMessage over RPC needs to read its body, and the implementation exposes `raw` on the base class. Needed for an upstream change making EmailMessage and ForwardableEmailMessage serializable over JS RPC.
|
This pull request was not reviewed automatically because its author does not have write access to this repository. A maintainer with write access can start a review by commenting |
petebacondarwin
approved these changes
Nov 17, 2026
petebacondarwin
left a comment
Contributor
There was a problem hiding this comment.
Looks like exposing raw is a pure typings change? Was it already part of the runtime type?
Collaborator
Author
Yes, we're moving it from the ForwardableEmailMessage class to the parent EmailMessage class as part of the work to make it possible to send EmailMessages over JSRPC |
jp4a50
approved these changes
Nov 20, 2026
Skye-31
enabled auto-merge
November 23, 2026 10:39
danlapid
disabled auto-merge
November 23, 2026 17:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add JsValue.External.emailFwdr, a capability wrapper for the EmailFwdr that an inbound email event carries for forward() and reply(). EmailMessage and ForwardableEmailMessage are implemented outside workerd, so the capability is opaque here. It is classified as ineligible for replay, like the other capability-backed externals.
Move
rawfrom ForwardableEmailMessage up to EmailMessage in the public typings, and regenerate the type snapshots. A worker that receives an EmailMessage over RPC needs to read its body, and the implementation exposesrawon the base class.Needed for an upstream change making EmailMessage and ForwardableEmailMessage serializable over JS RPC.