diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-03-14 04:50:39 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-03-14 05:11:34 +0300 |
commit | f95553c1c04eb33638ea6b1af1f0a00e4a0bdd73 (patch) | |
tree | 4a57373c7f557732adebed86b6650f3ad65361b8 /tests | |
parent | 7f811468622ba491ca0e42d6c05bde39b209215e (diff) |
Fix permissions not honoured if updated right before joining a callfix-permissions-not-honoured-if-updated-right-before-joining-a-call
When the local participant joins a call the sent media is based on the
last fetched permissions. However, once the call is joined the sent
media is based on the participant permissions updates notified by the
signaling messages.
When the HPB is used the "participantPermissions" property of the
"participants->update" signaling messages is used. Those messages are
sent when the permissions are modified and also when a participant joins
a call, but in this last case it did not include the expected property.
Due to this, if the permissions of the local participant were updated
right before the participant joined the call and the participant data
was not fetched again yet the previous permissions would be used. If the
message sent when the permissions were updated was received before
actually joining the call then it would be ignored, and although the
message sent due to joining the call would be processed the WebUI would
not notice the permission change, as the message did not provide them.
To solve that now the "participants->update" message sent when joining a
call also includes the permissions. This way, even if the previous
permissions are initially used when joining the call as soon as the
signaling message sent due to joining the call is received the WebUI
will adjust the sent media to the new permissions.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Signaling/BackendNotifierTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/php/Signaling/BackendNotifierTest.php b/tests/php/Signaling/BackendNotifierTest.php index c90b00dbc..351cc3335 100644 --- a/tests/php/Signaling/BackendNotifierTest.php +++ b/tests/php/Signaling/BackendNotifierTest.php @@ -614,6 +614,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $userSession, 'nextcloudSessionId' => $userSession, 'participantType' => Participant::USER, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), 'userId' => $this->userId, ], ], @@ -624,6 +625,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $userSession, 'nextcloudSessionId' => $userSession, 'participantType' => Participant::USER, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), 'userId' => $this->userId, ], ], @@ -648,6 +650,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $guestSession, 'nextcloudSessionId' => $guestSession, 'participantType' => Participant::GUEST, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), ], ], 'users' => [ @@ -657,6 +660,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $userSession, 'nextcloudSessionId' => $userSession, 'participantType' => Participant::USER, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), 'userId' => $this->userId, ], [ @@ -665,6 +669,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $guestSession, 'nextcloudSessionId' => $guestSession, 'participantType' => Participant::GUEST, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), ], ], ], @@ -684,6 +689,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $userSession, 'nextcloudSessionId' => $userSession, 'participantType' => Participant::USER, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), 'userId' => $this->userId, ], ], @@ -694,6 +700,7 @@ class BackendNotifierTest extends \Test\TestCase { 'sessionId' => $guestSession, 'nextcloudSessionId' => $guestSession, 'participantType' => Participant::GUEST, + 'participantPermissions' => (Attendee::PERMISSIONS_MAX_DEFAULT ^ Attendee::PERMISSIONS_LOBBY_IGNORE), ], ], ], |