mirror of
https://github.com/strukturag/nextcloud-spreed-signaling.git
synced 2023-10-21 07:33:40 -05:00
Discard unneeded messages based on their "sid" parameter
If a message includes a "sid" parameter and it does not match the one from the publisher or the subscriber the message is ignored. However, if the message does not include a "sid" parameter it is processed just like before for backwards compatibility. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
@@ -789,6 +789,7 @@ func (s *ProxyServer) processPayload(ctx context.Context, client *ProxyClient, s
|
||||
case "candidate":
|
||||
mcuData = &signaling.MessageClientMessageData{
|
||||
Type: payload.Type,
|
||||
Sid: payload.Sid,
|
||||
Payload: payload.Payload,
|
||||
}
|
||||
case "endOfCandidates":
|
||||
@@ -807,6 +808,7 @@ func (s *ProxyServer) processPayload(ctx context.Context, client *ProxyClient, s
|
||||
case "sendoffer":
|
||||
mcuData = &signaling.MessageClientMessageData{
|
||||
Type: payload.Type,
|
||||
Sid: payload.Sid,
|
||||
}
|
||||
default:
|
||||
session.sendMessage(message.NewErrorServerMessage(UnsupportedPayload))
|
||||
|
||||
Reference in New Issue
Block a user