mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-08 00:42:25 +02:00
parent
aeb7834ff7
commit
c51276596b
8
hub.go
8
hub.go
|
@ -1677,6 +1677,11 @@ func sendMcuProcessingFailed(session *ClientSession, message *ClientMessage) {
|
|||
}
|
||||
|
||||
func (h *Hub) isInSameCall(senderSession *ClientSession, recipientSessionId string) bool {
|
||||
if senderSession.ClientType() == HelloClientTypeInternal {
|
||||
// Internal clients may subscribe all streams.
|
||||
return true
|
||||
}
|
||||
|
||||
senderRoom := senderSession.GetRoom()
|
||||
if senderRoom == nil || !senderRoom.IsSessionInCall(senderSession) {
|
||||
// Sender is not in a room or not in the call.
|
||||
|
@ -1690,7 +1695,8 @@ func (h *Hub) isInSameCall(senderSession *ClientSession, recipientSessionId stri
|
|||
}
|
||||
|
||||
recipientRoom := recipientSession.GetRoom()
|
||||
if recipientRoom == nil || !senderRoom.IsEqual(recipientRoom) || !recipientRoom.IsSessionInCall(recipientSession) {
|
||||
if recipientRoom == nil || !senderRoom.IsEqual(recipientRoom) ||
|
||||
(recipientSession.ClientType() != HelloClientTypeInternal && !recipientRoom.IsSessionInCall(recipientSession)) {
|
||||
// Recipient is not in a room, a different room or not in the call.
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue