From 69116a57fcf1ca7f4f67536be97985415b6afbe9 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Wed, 26 Jan 2022 00:26:42 -0800 Subject: [PATCH] Correctly use writeParticipantMessage for APIs (#376) --- pkg/service/roomservice.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/service/roomservice.go b/pkg/service/roomservice.go index c3b6ae008..109b782bf 100644 --- a/pkg/service/roomservice.go +++ b/pkg/service/roomservice.go @@ -130,7 +130,7 @@ func (s *RoomService) GetParticipant(ctx context.Context, req *livekit.RoomParti } func (s *RoomService) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (res *livekit.RemoveParticipantResponse, err error) { - err = s.writeRoomMessage(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity), &livekit.RTCNodeMessage{ + err = s.writeParticipantMessage(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity), &livekit.RTCNodeMessage{ Message: &livekit.RTCNodeMessage_RemoveParticipant{ RemoveParticipant: req, }, @@ -214,7 +214,7 @@ func (s *RoomService) MutePublishedTrack(ctx context.Context, req *livekit.MuteR } func (s *RoomService) UpdateParticipant(ctx context.Context, req *livekit.UpdateParticipantRequest) (*livekit.ParticipantInfo, error) { - err := s.writeRoomMessage(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity), &livekit.RTCNodeMessage{ + err := s.writeParticipantMessage(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity), &livekit.RTCNodeMessage{ Message: &livekit.RTCNodeMessage_UpdateParticipant{ UpdateParticipant: req, }, @@ -242,7 +242,7 @@ func (s *RoomService) UpdateParticipant(ctx context.Context, req *livekit.Update } func (s *RoomService) UpdateSubscriptions(ctx context.Context, req *livekit.UpdateSubscriptionsRequest) (*livekit.UpdateSubscriptionsResponse, error) { - err := s.writeRoomMessage(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity), &livekit.RTCNodeMessage{ + err := s.writeParticipantMessage(ctx, livekit.RoomName(req.Room), livekit.ParticipantIdentity(req.Identity), &livekit.RTCNodeMessage{ Message: &livekit.RTCNodeMessage_UpdateSubscriptions{ UpdateSubscriptions: req, },