Fix missing picture on peer in lobby.

auto_join_3.3
Håvar Aambø Fosstveit 2020-05-08 22:02:06 +02:00
parent 717c0053e5
commit c73ee5c26b
2 changed files with 13 additions and 7 deletions

View File

@ -2124,15 +2124,21 @@ export default class RoomClient
lobbyPeers.forEach((peer) =>
{
store.dispatch(
lobbyPeerActions.addLobbyPeer(peer.peerId));
lobbyPeerActions.addLobbyPeer(peer.id));
store.dispatch(
lobbyPeerActions.setLobbyPeerDisplayName(
peer.displayName,
peer.peerId
peer.id
)
);
store.dispatch(
lobbyPeerActions.setLobbyPeerPicture(peer.picture));
lobbyPeerActions.setLobbyPeerPicture(
peer.picture,
peer.id
)
);
});
store.dispatch(
@ -2930,11 +2936,11 @@ export default class RoomClient
(lobbyPeers.length > 0) && lobbyPeers.forEach((peer) =>
{
store.dispatch(
lobbyPeerActions.addLobbyPeer(peer.peerId));
lobbyPeerActions.addLobbyPeer(peer.id));
store.dispatch(
lobbyPeerActions.setLobbyPeerDisplayName(peer.displayName, peer.peerId));
lobbyPeerActions.setLobbyPeerDisplayName(peer.displayName, peer.id));
store.dispatch(
lobbyPeerActions.setLobbyPeerPicture(peer.picture));
lobbyPeerActions.setLobbyPeerPicture(peer.picture, peer.id));
});
(accessCode != null) && store.dispatch(

View File

@ -46,7 +46,7 @@ class Lobby extends EventEmitter
return Object.values(this._peers).map((peer) =>
({
peerId : peer.id,
id : peer.id,
displayName : peer.displayName,
picture : peer.picture
}));