Skip to content

Commit

Permalink
Check for nil recipient before trying to access nested fields
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardDowling committed Jan 9, 2025
1 parent 7e79e3e commit 7b318dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions integrations/access/msteams/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ func (b *Bot) FetchRecipient(ctx context.Context, recipient string) (*common.Rec
b.mu.RLock()
d, ok := b.fullRecipients[recipient]
b.mu.RUnlock()
rd, err := getRecipientData(&d)
if err != nil {
return nil, trace.Wrap(err)
}
if ok {
rd, err := getRecipientData(&d)
if err != nil {
return nil, trace.Wrap(err)
}
log.DebugContext(ctx, "Found recipient in cache",
slog.Group("recipient",
"id", d.ID,
Expand Down

0 comments on commit 7b318dd

Please sign in to comment.