From 6a64dbfd678760ee78d6b541d1dfb32bf3fcc629 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 20 Sep 2020 14:51:20 -0400 Subject: Template sourced documents support DownloadAsPostMessage DownloadAsPostMessage is specific to the client, not the document. When creating new documents from templates, we should still respect the DownloadAsPostMessage flag. --- lib/TokenManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/TokenManager.php b/lib/TokenManager.php index 5cf085d9..3c39afd3 100644 --- a/lib/TokenManager.php +++ b/lib/TokenManager.php @@ -259,7 +259,7 @@ class TokenManager { $serverHost = $this->urlGenerator->getAbsoluteURL('/'); if ($this->capabilitiesService->hasTemplateSource()) { - $wopi = $this->wopiMapper->generateFileToken($targetFile->getId(), $owneruid, $editoruid, 0, (int)$updatable, $serverHost, null, 0, false, false, false, $templateFile->getId()); + $wopi = $this->wopiMapper->generateFileToken($targetFile->getId(), $owneruid, $editoruid, 0, (int)$updatable, $serverHost, null, 0, false, $direct, false, $templateFile->getId()); } else { // Legacy way of creating new documents from a template $wopi = $this->wopiMapper->generateFileToken($templateFile->getId(), $owneruid, $editoruid, 0, (int)$updatable, $serverHost, null, $targetFile->getId(), $direct); -- cgit v1.2.3