зеркало из https://github.com/mozilla/hubs.git
Merge pull request #2794 from robin-k-wilson/fix-missing-data
add missing occupant data
This commit is contained in:
Коммит
4c9f884208
|
@ -142,9 +142,10 @@ export default class HubChannel extends EventTarget {
|
|||
|
||||
// This is fairly hacky, but gets the # of initial occupants
|
||||
let initialOccupantCount = 0;
|
||||
|
||||
if (NAF.connection.adapter && NAF.connection.adapter.publisher) {
|
||||
initialOccupantCount = NAF.connection.adapter.publisher.initialOccupants.length;
|
||||
if (NAF.connection.adapter) {
|
||||
// When I enter room as avatar, count number of people inside the room as avatars and lobby
|
||||
// I enter room alone, no one in lobby, this is 0
|
||||
initialOccupantCount = Object.keys(NAF.connection.adapter.occupants).length;
|
||||
}
|
||||
|
||||
const entryTimingFlags = this.getEntryTimingFlags();
|
||||
|
|
Загрузка…
Ссылка в новой задаче