Updated serverhistory and fixed some bugs.

This commit is contained in:
Håvar Aambø Fosstveit
2019-10-17 10:55:03 +02:00
parent f51d07285d
commit 3495245e37
3 changed files with 55 additions and 42 deletions
+20 -1
View File
@@ -607,7 +607,9 @@ export default class RoomClient
const {
chatHistory,
fileHistory,
lastN
lastN,
locked,
lobbyPeers
} = await this.sendRequest('serverHistory');
if (chatHistory.length > 0)
@@ -635,6 +637,23 @@ export default class RoomClient
this._spotlights.addSpeakerList(lastN);
}
locked ?
store.dispatch(stateActions.setRoomLocked()) :
store.dispatch(stateActions.setRoomUnLocked());
if (lobbyPeers.length > 0)
{
logger.debug('Got lobby peers');
lobbyPeers.forEach((peer) =>
{
store.dispatch(
stateActions.addLobbyPeer(peer.peerId));
store.dispatch(
stateActions.setLobbyPeerDisplayName(peer.displayName));
});
}
}
catch (error)
{