diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index 8b74152..d7b4772 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -330,6 +330,8 @@ export default class RoomClient { text : 'You are logged in.' })); + this.changeDisplayName(displayName); + this.changePicture(picture); } _soundNotification() diff --git a/app/src/actions/stateActions.js b/app/src/actions/stateActions.js index 8a8d545..f0b030b 100644 --- a/app/src/actions/stateActions.js +++ b/app/src/actions/stateActions.js @@ -14,7 +14,6 @@ export const setRoomName = (name) => }; }; - export const setRoomState = (state) => { return { @@ -77,7 +76,6 @@ export const setJoinByAccessCode = (joinByAccessCode) => }; }; - export const setSettingsOpen = ({ settingsOpen }) => ({ type : 'SET_SETTINGS_OPEN', diff --git a/server/lib/Lobby.js b/server/lib/Lobby.js index 1b537f7..c1cda33 100644 --- a/server/lib/Lobby.js +++ b/server/lib/Lobby.js @@ -91,7 +91,7 @@ class Lobby extends EventEmitter this._notification(peer.socket, 'enteredLobby'); - if (config.requireSignInToAccess && !peer.authenticated && !super.isLocked) + if (config.requireSignInToAccess && !peer.authenticated && !super.isLocked()) this._notification(peer.socket, 'signInRequired'); this._peers.set(peer.id, peer); @@ -160,6 +160,18 @@ class Lobby extends EventEmitter cb(); + break; + } + case 'changePicture': + { + const { picture } = request.data; + + peer.picture = picture; + + this.emit('changePicture', peer); + + cb(); + break; } }