Repository navigation
feat(gchat): expose sender email on message authors and action users - #1136
Merged
Merged
Conversation
Google Chat webhook events carry the sender's email address, and the Author and ActionEvent user types already have an optional email field, but the adapter never filled it. Set author.email on incoming messages from sender.email and user.email on card clicks from the clicking user's email. An empty or missing email leaves the field undefined. Signed-off-by: Peep van Puijenbroek <4386577+Swahjak@users.noreply.github.com>
Contributor
|
@Swahjak is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
…ons, and fetchMessages Pub/Sub messages, reactions, and fetchMessages results come from the Chat API, whose user resource has no email. The adapter already caches the sender's email from webhook messages, so these paths now read it from that cache alongside the display name. A Pub/Sub payload that carries an email takes precedence, and a failed state read leaves the email undefined without failing the message, fetch, or reaction. The user cache now merges on write, so a later event without an email, avatar, or bot flag keeps the stored values, and an empty email is treated as missing. A cached entry without an email is checked against the state adapter on lookup, which picks up an email stored by another instance, and concurrent lookups for one user share a single read. A display name seen only on a Pub/Sub or fetchMessages payload creates the stored entry when none exists and no longer replaces one. The docs section and changeset describe the cache fallback and when the email can be undefined. Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
bensabic
approved these changes
Nov 12, 2026
The Microsoft SDK looks up a user token for each activity it processes. TestTeamsAdapter only stubbed that lookup in stubOutbound and spyActivitySender, so tests that drove the SDK through allowUnauthenticatedWebhooks or receive alone waited on it, and the inbound markdown budget tests could exceed the 5 second test timeout. allowUnauthenticatedWebhooks and receive now apply the stub as well, which keeps those tests off the lookup. Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
bensabic
enabled auto-merge (squash)
November 12, 2026 08:50
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.
Closes #1134
Google Chat webhook events carry the sender's email address, but the adapter never filled the optional
emailfield on message authors or action users. This setsmessage.author.emailfromsender.emailon webhook messages andevent.user.emailfrom the clicking user'semailon card button clicks. An empty or missing email leaves the fieldundefined.Pub/Sub messages, reactions, and
fetchMessagesresults come from the Chat API, whose user resource has no email field. The adapter already caches each webhook sender's email, so those paths now read it from the cache alongside the display name. The field is set once the user has sent a webhook message that included an email, and isundefineduntil then. A state read failure also leaves itundefinedwithout failing the message, fetch, or reaction.The user cache changes to support this. Writes from webhook messages merge with the stored entry, so a later event without an email, avatar, or bot flag keeps them. A display name seen only on a Pub/Sub or
fetchMessagespayload creates the stored entry when the user has none and no longer replaces one, which meansgetUsercan return an older display name until the user's next webhook message. The docs page gets a "User email addresses" section covering this, and the changeset isminor.pnpm validatepasses.