Skip to content

Commit

Permalink
Filter active ingresses in ListActiveIngresses method to return only …
Browse files Browse the repository at this point in the history
…those that are publishing
  • Loading branch information
juancarmore committed Nov 18, 2024
1 parent 62949c4 commit 7cbd6bc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion openvidu/livekithelper/livekithelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,13 @@ func (o *LivekitHelper) ListActiveIngresses() ([]*livekit.IngressInfo, error) {
if err != nil {
return nil, err
}
return ingresses, nil

activeIngresses := make([]*livekit.IngressInfo, 0)
for _, ingress := range ingresses {
if ingress.State.Status == livekit.IngressState_ENDPOINT_PUBLISHING && ingress.State.ResourceId != "" {
activeIngresses = append(activeIngresses, ingress)
}
}

return activeIngresses, nil
}

0 comments on commit 7cbd6bc

Please sign in to comment.