Browse Source
Handle case where room has no participants.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
pull/398/head
Joachim Bauch
8 years ago
Failed to extract signature
1 changed files with
5 additions and
3 deletions
-
js/app.js
|
|
|
@ -398,6 +398,7 @@ |
|
|
|
.then(function() { |
|
|
|
self.stopListening(self.activeRoom, 'change:participantInCall'); |
|
|
|
|
|
|
|
var participants; |
|
|
|
if (OC.getCurrentUser().uid) { |
|
|
|
roomChannel.trigger('active', token); |
|
|
|
|
|
|
|
@ -406,14 +407,15 @@ |
|
|
|
self.activeRoom = room; |
|
|
|
} |
|
|
|
}); |
|
|
|
participants = self.activeRoom.get('participants'); |
|
|
|
} else { |
|
|
|
// The public page supports only a single room, so the
|
|
|
|
// active room is already the room for the given token.
|
|
|
|
|
|
|
|
self.setRoomMessageForGuest(self.activeRoom.get('participants')); |
|
|
|
participants = self.activeRoom.get('participants'); |
|
|
|
self.setRoomMessageForGuest(participants); |
|
|
|
} |
|
|
|
// Disable video when entering a room with more than 5 participants.
|
|
|
|
if (Object.keys(self.activeRoom.get('participants')).length > 5) { |
|
|
|
if (participants && Object.keys(participants).length > 5) { |
|
|
|
self.disableVideo(); |
|
|
|
} |
|
|
|
|
|
|
|
|