Skip to content

Commit a1510bd

Browse files
committed
collab: Make the join link work regardless of user preferences
veaction=editsource/edit links always work, even if you have the visual editor disabled in preferences or if you're using different default mode than the session host. Bug: T370817 Change-Id: Ia4a72cdbdd732a29fd353a5efa6ee912d32374cb
1 parent d7ad52e commit a1510bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

collab/ve.ui.CollabProcessDialog.js

+3
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ ve.ui.HostCollabProcessDialog.prototype.onButtonClick = function () {
145145

146146
ve.collab.initPeerServer( this.userNameInput.getValue() );
147147
const collabUrl = new URL( location.href );
148+
collabUrl.searchParams.delete( 'action' );
149+
collabUrl.searchParams.set( 'veaction',
150+
ve.init.target.getSurface().getMode() === 'source' ? 'editsource' : 'edit' );
148151
ve.collab.peerServer.peer.on( 'open', ( newId ) => {
149152
collabUrl.searchParams.set( 'collabSession', newId );
150153
this.copyTextLayout.textInput.setValue( collabUrl );

0 commit comments

Comments
 (0)