mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-02 21:44:06 +08:00
updating user is typing when user disconnects
This commit is contained in:
parent
b2dc21b522
commit
46396f6465
1 changed files with 5 additions and 0 deletions
|
|
@ -1086,6 +1086,11 @@ MP.socket.on("mp_room_leave", () => {
|
|||
|
||||
MP.socket.on("mp_room_user_left", (data) => {
|
||||
mp_playSound("leave");
|
||||
if (MP.room.whoIsTyping === undefined) {
|
||||
MP.room.whoIsTyping = {};
|
||||
}
|
||||
MP.room.whoIsTyping[data.sid] = { name: data.name, truefalse: false };
|
||||
mp_updateWhoIsTyping();
|
||||
delete MP.room.users[data.sid];
|
||||
if (data.newLeader !== "" && data.newLeader === MP.socket.id) {
|
||||
MP.room.isLeader = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue