Skip to content

Commit 4797b90

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
normalize email addresses
1 parent 67d4cf0 commit 4797b90

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

internal/notify/daily_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func TestFormatDigestMessage(t *testing.T) {
3636
_Your daily digest from Ready to Review_`,
3737
},
3838
{
39-
name: "outgoing PRs only at 8:15am",
40-
time: time.Date(2025, 10, 22, 8, 15, 0, 0, time.UTC),
39+
name: "outgoing PRs only at 8:15am",
40+
time: time.Date(2025, 10, 22, 8, 15, 0, 0, time.UTC),
4141
incoming: nil,
4242
outgoing: []home.PR{
4343
{

internal/usermapping/usermapping.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,9 @@ func (s *Service) findSlackMatches(ctx context.Context, githubUsername string, e
387387

388388
// Search for each email in Slack user directory
389389
for _, email := range emails {
390-
user, err := s.slackClient.GetUserByEmailContext(ctx, email)
390+
// Normalize email to lowercase for consistent matching
391+
normalizedEmail := strings.ToLower(email)
392+
user, err := s.slackClient.GetUserByEmailContext(ctx, normalizedEmail)
391393
if err != nil {
392394
slog.Debug("no Slack user found for email",
393395
"email", email,

0 commit comments

Comments
 (0)