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
parent
commit
1ba0f66dcf
Failed to extract signature
  1. 8
      js/app.js

8
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();
}

Loading…
Cancel
Save