From b9ee0b58001d9662a7ef22375fc55e6a95de22d5 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Sun, 24 Apr 2022 23:09:06 -0700 Subject: [PATCH] Skip loading of participant before writing messages to them. (#654) In some implementations of the Store interface, it's possible that the media node has not yet persisted the participant when we are trying to send it messages. In which case we should not error on loading of the participant. --- pkg/service/roomservice.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/service/roomservice.go b/pkg/service/roomservice.go index 71d4016f..3f81e728 100644 --- a/pkg/service/roomservice.go +++ b/pkg/service/roomservice.go @@ -339,11 +339,6 @@ func (s *RoomService) writeParticipantMessage(ctx context.Context, room livekit. return twirpAuthError(err) } - _, err := s.roomStore.LoadParticipant(ctx, room, identity) - if err != nil { - return err - } - return s.router.WriteParticipantRTC(ctx, room, identity, msg) }