Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol diffdown.com

fix: connect owner to WebSocket room — isCollaborator guard was blocking owner

+4 -4
+4 -4
templates/document_edit.html
··· 514 514 let wsMissedPings = 0; 515 515 516 516 function connectWebSocket() { 517 - if (!isCollaborator || !accessToken) return; 517 + if (!accessToken) return; 518 518 519 519 const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'; 520 520 const ownerParam = ownerDID ? `&owner_did=${encodeURIComponent(ownerDID)}` : ''; ··· 856 856 } 857 857 858 858 async function loadComments() { 859 - if (!isCollaborator) return; 859 + if (!accessToken) return; 860 860 try { 861 861 const resp = await fetch(`/api/docs/${rkey}/comments`); 862 862 if (!resp.ok) return; ··· 881 881 882 882 applyMode(currentMode); 883 883 884 - // Start collaboration features 885 - if (isCollaborator) { 884 + // Start collaboration features (both owner and collaborators join the WS room) 885 + if (accessToken) { 886 886 connectWebSocket(); 887 887 loadComments(); 888 888 }