diff options
-rw-r--r-- | apps/sharebymail/lib/ShareByMailProvider.php | 6 | ||||
-rw-r--r-- | apps/sharebymail/tests/ShareByMailProviderTest.php | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index f31a774b1d1..459b1ffe7c1 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -381,7 +381,6 @@ class ShareByMailProvider implements IShareProvider { $initiatorUser = $this->userManager->get($initiator); $ownerDisplayName = ($ownerUser instanceof IUser) ? $ownerUser->getDisplayName() : $owner; $initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; - $initiatorEmailAddress = ($initiatorUser instanceof IUser) ? $initiatorUser->getEMailAddress() : null; if ($owner === $initiator) { $subject = (string)$this->l->t('%s shared »%s« with you', array($ownerDisplayName, $filename)); } else { @@ -408,11 +407,6 @@ class ShareByMailProvider implements IShareProvider { $link ); - $emailTemplate->addFooter(); - if ($initiatorEmailAddress !== null) { - $message->setFrom([$initiatorEmailAddress => $initiatorDisplayName]); - } - $message->setTo([$shareWith]); // The "From" contains the sharers name diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index a3e5da82bf2..269f8e8f414 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -187,11 +187,11 @@ class ShareByMailProviderTest extends TestCase { $node = $this->getMockBuilder(File::class)->getMock(); $node->expects($this->any())->method('getName')->willReturn('filename'); - $instance = $this->getInstance(['getSharedWith', 'createMailShare', 'getRawShare', 'createShareObject', 'createActivity', 'sendPassword']); + $instance = $this->getInstance(['getSharedWith', 'createMailShare', 'getRawShare', 'createShareObject', 'createShareActivity', 'sendPassword']); $instance->expects($this->once())->method('getSharedWith')->willReturn([]); $instance->expects($this->once())->method('createMailShare')->with($share)->willReturn(42); - $instance->expects($this->once())->method('createActivity')->with($share); + $instance->expects($this->once())->method('createShareActivity')->with($share); $instance->expects($this->once())->method('getRawShare')->with(42)->willReturn('rawShare'); $instance->expects($this->once())->method('createShareObject')->with('rawShare')->willReturn('shareObject'); $instance->expects($this->any())->method('sendPassword')->willReturn(true); @@ -661,7 +661,7 @@ class ShareByMailProviderTest extends TestCase { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); - $provider = $this->getInstance(['sendMailNotification', 'createActivity']); + $provider = $this->getInstance(['sendMailNotification', 'createShareActivity']); $u1 = $userManager->createUser('testFed', md5(time())); $u2 = $userManager->createUser('testFed2', md5(time())); @@ -703,7 +703,7 @@ class ShareByMailProviderTest extends TestCase { $userManager = \OC::$server->getUserManager(); $rootFolder = \OC::$server->getRootFolder(); - $provider = $this->getInstance(['sendMailNotification', 'createActivity']); + $provider = $this->getInstance(['sendMailNotification', 'createShareActivity']); $u1 = $userManager->createUser('testFed', md5(time())); $u2 = $userManager->createUser('testFed2', md5(time())); |