diff --git a/parcel/lib/room-controller.js b/parcel/lib/room-controller.js index b8df304..adb7fa6 100644 --- a/parcel/lib/room-controller.js +++ b/parcel/lib/room-controller.js @@ -46,20 +46,20 @@ export default class RoomController{ if( type === 'text' ) this[type].current = room.id; - /* (5) Tell websocket: new text room */ - if( typeof this[type].current === 'number' && window.csock instanceof wscd ) - (type === 'text') && csock.send({ buffer: { rid: room.id } }); - - /* (6) If 'voice' room -> toggle audio */ + /* (5) If 'voice' room -> toggle audio */ if( type === 'voice' ){ AudioManager.kill(); + csock.send({ buffer: { audio: false } }); if( typeof this[type].current === 'number' ) AudioManager.launch(this[type].current); } + /* (6) Tell websocket we connect to room */ + if( typeof this[type].current === 'number' && window.csock instanceof wscd ) + csock.send({ buffer: { rid: this[type].current } }); /* (6) Update buffer */ this._buffer[type] = {}; diff --git a/parcel/vue/auth/dialog.vue b/parcel/vue/auth/dialog.vue index e05212a..1ea930e 100644 --- a/parcel/vue/auth/dialog.vue +++ b/parcel/vue/auth/dialog.vue @@ -38,7 +38,7 @@
- {{ gs.content.user(uid).username }} + {{ ( uid == gs.auth.user.uid ) ? 'You' : gs.content.user(uid).username }}