From 9f82fb035b20af8923f8595dbe7b5b40e07f4f32 Mon Sep 17 00:00:00 2001 From: ras0q Date: Wed, 6 Sep 2023 21:02:25 +0900 Subject: [PATCH] :bug: check user in map --- router/presentation/event.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/router/presentation/event.go b/router/presentation/event.go index 93f39e65..0de5e2f2 100644 --- a/router/presentation/event.go +++ b/router/presentation/event.go @@ -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