changePicture on signIn

master
Stefan Otto 2019-10-31 01:05:11 +01:00
parent 59617aa2ad
commit 6c07f89ab1
3 changed files with 15 additions and 3 deletions

View File

@ -330,6 +330,8 @@ export default class RoomClient
{
text : 'You are logged in.'
}));
this.changeDisplayName(displayName);
this.changePicture(picture);
}
_soundNotification()

View File

@ -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',

View File

@ -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;
}
}