Skip to content

Commit

Permalink
Allow viewing of attachments when shared by mail
Browse files Browse the repository at this point in the history
Signed-off-by: soeren.kaschubowski <soeren.kaschubowski@hetzner.com>
  • Loading branch information
ksoeren committed Aug 29, 2024
1 parent 7473e67 commit 38c3784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/AttachmentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ private function getTextFilePublic(?int $documentId, string $shareToken): File {
// is the file shared with this token?
try {
$share = $this->shareManager->getShareByToken($shareToken);
if ($share->getShareType() === IShare::TYPE_LINK) {
if (in_array($share->getShareType(), [IShare::TYPE_LINK, IShare::TYPE_EMAIL])) {
// shared file or folder?
if ($share->getNodeType() === 'file') {
$textFile = $share->getNode();
Expand Down

0 comments on commit 38c3784

Please sign in to comment.