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 eed26e3
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 @@ -34,7 +34,7 @@ const getSearchParam = (name) => {

const getCallbackBaseUrl = () => {
const callbackUrl = Config.get('wopi_callback_url')
return callbackUrl || window.location.protocol + '//' + window.location.host + getRootUrl() + '/'
return callbackUrl || window.location.protocol + '//' + window.location.host + getRootUrl()
}

const getWopiSrc = (fileId) => {
Expand Down

0 comments on commit eed26e3

Please sign in to comment.