Skip to content

Commit

Permalink
feat: don't send cursor updates for not password authenticated member…
Browse files Browse the repository at this point in the history
…s in password protected rooms
  • Loading branch information
mmkiir committed Feb 22, 2023
1 parent 31c999f commit d84d988
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/src/scripts/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 160,7 @@ export async function sendCursorUpdates(room: Room<RoomState>, interval = 40) {
console.log("Websocket connection open, sending cursor updates");
window.clearInterval(cursorInterval);
cursorInterval = window.setInterval(async () => {
if (room.state.isPasswordProtected && !get(currentUser).isPasswordAuthenticated) return;
try {
if (transport.ws.readyState !== WebSocket.OPEN) {
window.clearInterval(cursorInterval);
Expand Down

0 comments on commit d84d988

Please sign in to comment.