mirror of
https://github.com/livekit/livekit.git
synced 2026-05-14 03:15:26 +00:00
Add logs around permissions handling (#803)
This commit is contained in:
@@ -1042,6 +1042,7 @@ func (p *ParticipantImpl) SubscriptionPermissionUpdate(publisherID livekit.Parti
|
||||
}
|
||||
p.lock.Unlock()
|
||||
|
||||
p.params.Logger.Debugw("sending subscription permission update", "publisherID", publisherID, "trackID", trackID, "allowed", allowed)
|
||||
err := p.writeMessage(&livekit.SignalResponse{
|
||||
Message: &livekit.SignalResponse_SubscriptionPermissionUpdate{
|
||||
SubscriptionPermissionUpdate: &livekit.SubscriptionPermissionUpdate{
|
||||
|
||||
@@ -205,6 +205,7 @@ func (u *UpTrackManager) UpdateSubscriptionPermission(
|
||||
u.lock.Lock()
|
||||
defer u.lock.Unlock()
|
||||
|
||||
u.params.Logger.Debugw("updating subscription permission", "permissions", subscriptionPermission)
|
||||
if subscriptionPermission == nil {
|
||||
// store as is for use when migrating
|
||||
u.subscriptionPermission = subscriptionPermission
|
||||
@@ -422,6 +423,7 @@ func (u *UpTrackManager) maybeAddPendingSubscription(trackID livekit.TrackID, su
|
||||
}
|
||||
|
||||
u.pendingSubscriptions[trackID] = append(u.pendingSubscriptions[trackID], subscriberIdentity)
|
||||
u.params.Logger.Debugw("adding pending subscription", "subscriberID", sub.ID(), "trackID", trackID)
|
||||
u.opsQueue.Enqueue(func() {
|
||||
sub.SubscriptionPermissionUpdate(u.params.SID, trackID, false)
|
||||
})
|
||||
@@ -477,6 +479,7 @@ func (u *UpTrackManager) processPendingSubscriptions(resolver func(participantId
|
||||
continue
|
||||
}
|
||||
|
||||
u.params.Logger.Debugw("reinstating pending subscription", "subscriberID", sub.ID(), "trackID", trackID)
|
||||
u.opsQueue.Enqueue(func() {
|
||||
sub.SubscriptionPermissionUpdate(u.params.SID, trackID, true)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user