Get participants from the active room to set the room message for guests

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2018-11-30 16:53:24 +01:00
Родитель b82286e9fa
Коммит d2dc0b6e9d
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -492,7 +492,7 @@
// The public page supports only a single room, so the
// active room is already the room for the given token.
participants = self.activeRoom.get('participants');
self.setRoomMessageForGuest(participants);
self.setRoomMessageForGuest();
}
// Disable video when entering a room with more than 5 participants.
if (participants && Object.keys(participants).length > 5) {
@ -621,7 +621,9 @@
restoreEmptyContent: function() {
this.setEmptyContentMessage.apply(this, this._lastEmptyContent);
},
setRoomMessageForGuest: function(participants) {
setRoomMessageForGuest: function() {
var participants = this.activeRoom.get('participants');
if (Object.keys(participants).length === 1) {
var participantId = '',
participantName = '';

Просмотреть файл

@ -162,8 +162,7 @@
OCA.SpreedMe.app._chatView.$el.appendTo('#talk-sidebar');
OCA.SpreedMe.app._chatView.setTooltipContainer($('body'));
var participants = OCA.SpreedMe.app.activeRoom.get('participants');
OCA.SpreedMe.app.setRoomMessageForGuest(participants);
OCA.SpreedMe.app.setRoomMessageForGuest();
OCA.SpreedMe.app.setPageTitle(OCA.SpreedMe.app.activeRoom.get('displayName'));