Publisher controlled flex permissions (#284)
* WIP commit * Add some tests * allowedSubscribers uses participant sid * correct variable name * correct another variable name * Add ParticipantSid to SubscriptionPermissionUpdate message * protocol v0.11.2 * WIP commit * WIP commit * fix tests * Remove unused code * Close uptrack manager * Remove duplicate close * move comment to the correct line where the loop could be long * Fix disallowed list revocation, thank you Jie * Remove unneeded interface method * RemoveSubscriber in Participant * Clean up disallowed subscriptions and handle permissions on new track addition * add test for track addition after permission set * Remove unnecessary check
This commit is contained in:
@@ -274,7 +274,7 @@ func (r *RoomManager) StartSession(ctx context.Context, roomName string, pi rout
|
||||
}
|
||||
|
||||
r.telemetry.ParticipantJoined(ctx, room.Room, participant.ToProto(), pi.Client)
|
||||
participant.OnClose(func(p types.Participant) {
|
||||
participant.OnClose(func(p types.Participant, disallowedSubscriptions map[string]string) {
|
||||
if err := r.roomStore.DeleteParticipant(ctx, roomName, p.Identity()); err != nil {
|
||||
pLogger.Errorw("could not delete participant", err)
|
||||
}
|
||||
@@ -286,6 +286,8 @@ func (r *RoomManager) StartSession(ctx context.Context, roomName string, pi rout
|
||||
}
|
||||
}
|
||||
r.telemetry.ParticipantLeft(ctx, room.Room, p.ToProto())
|
||||
|
||||
room.RemoveDisallowedSubscriptions(p, disallowedSubscriptions)
|
||||
})
|
||||
|
||||
go r.rtcSessionWorker(room, participant, requestSource)
|
||||
|
||||
Reference in New Issue
Block a user