Skip to content

Commit 2c1f0c1

Browse files
authored
Merge pull request #458 from traPtitech/fix/map-check
🐛 check user in map
2 parents 7084a44 + 9f82fb0 commit 2c1f0c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

router/presentation/event.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ func iCalVeventFormat(e *domain.Event, host string, userMap map[uuid.UUID]*domai
121121
vevent.SetLocation(e.Room.Place)
122122
vevent.SetOrganizer(e.CreatedBy.DisplayName)
123123
for _, v := range e.Attendees {
124-
user := userMap[v.UserID]
124+
user, ok := userMap[v.UserID]
125+
if !ok {
126+
continue
127+
}
128+
125129
userName := fmt.Sprintf("@%s", user.Name)
126130
userDisplayName := ics.WithCN(user.DisplayName)
127131
var ps ics.ParticipationStatus

0 commit comments

Comments
 (0)