Skip to content

Commit

Permalink
Fixes #3492 joining after document is renamed inside editor
Browse files Browse the repository at this point in the history
Bug:
1. Open document
2. Rename in Collabora Online using input in the title bar
3. In the new tab open the same document from file picker in NC
Result: 2 sessions are in different instances of the same document

getCallbackBaseUrl() puts "/" at the end, but WOPISrc was adding
additional one:
const wopiurl = getCallbackBaseUrl() + '/ ...

Then reconnected session after rename had single "/index.php"
but new session used "//index.php" what caused that COOL server
didn't consider both as the same identifier

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
  • Loading branch information
eszkadev committed Feb 22, 2024
1 parent b784eeb commit 4a5828b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const getCallbackBaseUrl = () => {
const getWopiSrc = (fileId) => {
// WOPISrc - URL that loolwsd will access (ie. pointing to ownCloud)
// index.php is forced here to avoid different wopi srcs for the same document
const wopiurl = getCallbackBaseUrl() + '/index.php/apps/richdocuments/wopi/files/' + fileId
const wopiurl = getCallbackBaseUrl() + 'index.php/apps/richdocuments/wopi/files/' + fileId
console.debug('[getWopiUrl] ' + wopiurl)
return wopiurl
}
Expand Down

0 comments on commit 4a5828b

Please sign in to comment.