diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 619a4d1bfeef0e6d672933ec981e9cf406f0bba9..2d48198939bd93408bfcb49a0763f81a4f738c20 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -296,6 +296,9 @@ class Hooks {
                 // check if we share to a group
                 if($params['shareType'] === \OCP\Share::SHARE_TYPE_GROUP) {
                     $usersSharing[] = reset(\OC_Group::usersInGroup($params['shareWith']));
+                // check if we share with link
+                } else if($params['shareType'] === \OCP\Share::SHARE_TYPE_LINK) {
+                    $usersSharing[] = 'owncloud';
                 } else {
                     // Because this is a pre_share hook, the user
                     // being shared to is not yet included; add them