summaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-07-12 19:32:03 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-21 15:02:18 +0200
commit1ce519ad38e5c7f56a2c8007517570cac3c94bec (patch)
treee6b745ec88c12ad3b8f1f0c10d9a08df5bfb1868 /apps/sharebymail/lib
parentb56ccef564f19e78d5e3c9f255cfebcf2df8e31b (diff)
downloadnextcloud-server-1ce519ad38e5c7f56a2c8007517570cac3c94bec.tar.gz
nextcloud-server-1ce519ad38e5c7f56a2c8007517570cac3c94bec.zip
add direct link to the share
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/sharebymail/lib')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 50fbd6fa0ed..0e4ecded3f9 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -531,6 +531,13 @@ class ShareByMailProvider implements IShareProvider {
$emailTemplate->addHeading(htmlspecialchars($htmlHeading), $plainHeading);
$emailTemplate->addBodyText(htmlspecialchars($note), $note);
+ $link = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.showShare',
+ ['token' => $share->getToken()]);
+ $emailTemplate->addBodyButton(
+ $this->l->t('Open »%s«', [$filename]),
+ $link
+ );
+
// The "From" contains the sharers name
$instanceName = $this->defaults->getName();
$senderName = $this->l->t(