Give client correct authentication status when joining a room. Fixes #166

This commit is contained in:
Håvar Aambø Fosstveit
2020-04-01 21:58:41 +02:00
parent b19add7599
commit fa032036d7
4 changed files with 37 additions and 7 deletions
+9 -2
View File
@@ -2524,7 +2524,7 @@ export default class RoomClient
canShareFiles : this._torrentSupport
}));
const { roles, peers } = await this.sendRequest(
const { authenticated, roles, peers } = await this.sendRequest(
'join',
{
displayName : displayName,
@@ -2532,7 +2532,14 @@ export default class RoomClient
rtpCapabilities : this._mediasoupDevice.rtpCapabilities
});
logger.debug('_joinRoom() joined [peers:"%o", roles:"%o"]', peers, roles);
logger.debug(
'_joinRoom() joined [authenticated:"%s", peers:"%o", roles:"%o"]',
authenticated,
peers,
roles
);
store.dispatch(meActions.loggedIn(authenticated));
const myRoles = store.getState().me.roles;