Return authentication status to user

master
Håvar Aambø Fosstveit 2020-04-01 09:31:10 +02:00 committed by Mészáros Mihály
parent 12dc5ea28b
commit dd0d092857
2 changed files with 4 additions and 2 deletions

View File

@ -2239,7 +2239,7 @@ export default class RoomClient
canShareFiles : this._torrentSupport
}));
const { peers } = await this.sendRequest(
const { peers, authenticated } = await this.sendRequest(
'join',
{
displayName : displayName,
@ -2247,6 +2247,8 @@ export default class RoomClient
rtpCapabilities : this._mediasoupDevice.rtpCapabilities
});
store.dispatch(meActions.loggedIn(authenticated));
logger.debug('_joinRoom() joined, got peers [peers:"%o"]', peers);
for (const peer of peers)

View File

@ -472,7 +472,7 @@ class Room extends EventEmitter
.filter((joinedPeer) => joinedPeer.id !== peer.id)
.map((joinedPeer) => (joinedPeer.peerInfo));
cb(null, { peers: peerInfos });
cb(null, { peers: peerInfos, authenticated: peer.authenticated });
// Mark the new Peer as joined.
peer.joined = true;