Skip to content

Commit

Permalink
Merge pull request #3763 from hcvcastro/pr/main/00
Browse files Browse the repository at this point in the history
richdocuments: add host_session_id parameter
  • Loading branch information
juliusknorr authored Jul 15, 2024
2 parents a307af9 + 4f70c1d commit e44e5dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import '../css/document.scss'
import axios from '@nextcloud/axios'
import { spawnDialog } from '@nextcloud/dialogs'
import SaveAs from './components/Modal/SaveAs.vue'
import { getCapabilities } from './services/capabilities.ts'

const PostMessages = new PostMessageService({
parent: window.parent,
Expand Down Expand Up @@ -169,6 +170,8 @@ const documentsMain = {
+ '<input name="theme" value="' + getCollaboraTheme() + '" type="hidden"/>'
// buy product for new customer users
+ '<input name="buy_product" value="https://nextcloud.com/pricing" type="hidden"/>'
+ '<input name="host_session_id" value="nextcloud ' + OC.config.version
+ ' - richdocuments ' + getCapabilities().version + '" type="hidden"/>'
+ '</form>'

// iframe that contains the Collabora Online Viewer
Expand Down Expand Up @@ -229,6 +232,8 @@ const documentsMain = {
+ '<input name="theme" value="' + getCollaboraTheme() + '" type="hidden"/>'
// buy product for new customer users
+ '<input name="buy_product" value="https://nextcloud.com/pricing" type="hidden"/>'
+ '<input name="host_session_id" value="nextcloud ' + OC.config.version
+ ' - richdocuments ' + getCapabilities().version + '" type="hidden"/>'
+ '</form>'

// iframe that contains the Collabora Online
Expand Down
2 changes: 2 additions & 0 deletions src/view/Office.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<input name="css_variables" :value="formData.cssVariables" type="hidden">
<input name="theme" :value="formData.theme" type="hidden">
<input name="buy_product" value="https://nextcloud.com/pricing" type="hidden">
<input name="host_session_id" value="formData.hostSessionID" type="hidden">
</form>
<iframe :id="iframeId"
ref="documentFrame"
Expand Down Expand Up @@ -188,6 +189,7 @@ export default {
uiDefaults: getUIDefaults(),
cssVariables: generateCSSVarTokens(),
theme: getCollaboraTheme(),
hostSessionID: 'nextcloud ' + OC.config.version + ' - richdocuments ' + getCapabilities().version
},
}
},
Expand Down

0 comments on commit e44e5dc

Please sign in to comment.