Send Room updates when participant counts change (#1647)

Reduces the number of unneeded generation with ProtoProxy
This commit is contained in:
David Zhao
2023-04-22 21:08:59 -07:00
committed by GitHub
parent 745410bd69
commit 3f64828a77
7 changed files with 150 additions and 49 deletions
+1 -1
View File
@@ -451,7 +451,7 @@ func (r *RoomManager) getOrCreateRoom(ctx context.Context, roomName livekit.Room
newRoom.Logger.Infow("room closed")
})
newRoom.OnMetadataUpdate(func(metadata string) {
newRoom.OnRoomUpdated(func() {
if err := r.roomStore.StoreRoom(ctx, newRoom.ToProto(), newRoom.Internal()); err != nil {
newRoom.Logger.Errorw("could not handle metadata update", err)
}