If the external signaling server is used, when a participant is
disinvited it is expected that the client leaves the conversation if
still in it. Therefore, self-joined users should not be disinvited when
they disconnect from a conversation, as they can still have other
sessions in it.
To ensure that self-joined users will be disinvited when their last
session leaves the conversation now a USER_REMOVE event is explicitly
triggered when that last session leaves and the user is, in fact,
removed from the conversation.
Note that this does not cause the system message about the participant
leaving to be sent, as it is explicitly guarded against self-joined
users leaving the conversation. However, this change will cause other
handlers to be called now, like those to invalidate resources, but it is
very likely that they should have been called and that this change is
actually a fix too in that regard.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the breakout room status changes a "switchto" message is sent to
all the active sessions in either the parent or the breakout rooms
(depending on whether they are being started or stopped) with the token
of the room that they have to switch to.
When the breakout rooms are started the message is sent only to non
moderators, as moderators do not have a single breakout room assigned.
On the other hand, when the breakout rooms are stopped the message is
also sent to all moderators (who are in a breakout room and not already
in the parent room), as all participants need to switch to the parent
room.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When asserting that a message was sent to the signaling server all the
requests were validated before looking for the expected one. As the
requests include the token of the room all the requests were expected to
be sent to the same room; otherwise any request sent to other room would
make the assert fail. Now the requests to other rooms than the room of
the actual message being asserted are ignored, which will make possible
to sent messages to different rooms in the same test.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>