Skip to content

Commit

Permalink
Merge pull request #458 from traPtitech/fix/map-check
Browse files Browse the repository at this point in the history
🐛 check user in map
  • Loading branch information
ras0q committed Sep 6, 2023
2 parents 7084a44 + 9f82fb0 commit 2c1f0c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion router/presentation/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ func iCalVeventFormat(e *domain.Event, host string, userMap map[uuid.UUID]*domai
vevent.SetLocation(e.Room.Place)
vevent.SetOrganizer(e.CreatedBy.DisplayName)
for _, v := range e.Attendees {
user := userMap[v.UserID]
user, ok := userMap[v.UserID]
if !ok {
continue
}

userName := fmt.Sprintf("@%s", user.Name)
userDisplayName := ics.WithCN(user.DisplayName)
var ps ics.ParticipationStatus
Expand Down

0 comments on commit 2c1f0c1

Please sign in to comment.