changePicture on signIn

This commit is contained in:
Stefan Otto
2019-10-31 01:05:11 +01:00
parent 59617aa2ad
commit 6c07f89ab1
3 changed files with 15 additions and 3 deletions
+13 -1
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;
}
}