mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
chore: add 'email' field to notifications (#16336)
Closes https://github.com/coder/internal/issues/323 This PR adds an `email` field to the `data.owner` payload for workspace created and workspace manually updated notifications, as well as user account created/activated/suspended.
This commit is contained in:
@ -639,6 +639,12 @@ func TestPostWorkspacesByOrganization(t *testing.T) {
|
||||
require.Contains(t, sent[0].Targets, workspace.ID)
|
||||
require.Contains(t, sent[0].Targets, workspace.OrganizationID)
|
||||
require.Contains(t, sent[0].Targets, workspace.OwnerID)
|
||||
|
||||
owner, ok := sent[0].Data["owner"].(map[string]any)
|
||||
require.True(t, ok, "notification data should have owner")
|
||||
require.Equal(t, memberUser.ID, owner["id"])
|
||||
require.Equal(t, memberUser.Name, owner["name"])
|
||||
require.Equal(t, memberUser.Email, owner["email"])
|
||||
})
|
||||
|
||||
t.Run("CreateWithAuditLogs", func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user