|
@@ 384-388 (lines=5) @@
|
| 381 |
|
$initiatorUser = $this->userManager->get($initiator); |
| 382 |
|
$ownerDisplayName = ($ownerUser instanceof IUser) ? $ownerUser->getDisplayName() : $owner; |
| 383 |
|
$initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; |
| 384 |
|
if ($owner === $initiator) { |
| 385 |
|
$subject = (string)$this->l->t('%s shared »%s« with you', array($ownerDisplayName, $filename)); |
| 386 |
|
} else { |
| 387 |
|
$subject = (string)$this->l->t('%s shared »%s« with you on behalf of %s', array($ownerDisplayName, $filename, $initiatorDisplayName)); |
| 388 |
|
} |
| 389 |
|
|
| 390 |
|
$message = $this->mailer->createMessage(); |
| 391 |
|
|
|
@@ 396-400 (lines=5) @@
|
| 393 |
|
|
| 394 |
|
$emailTemplate->addHeader(); |
| 395 |
|
$emailTemplate->addHeading($this->l->t('%s shared »%s« with you', [$ownerDisplayName, $filename]), false); |
| 396 |
|
if ($owner === $initiator) { |
| 397 |
|
$text = $this->l->t('%s shared »%s« with you.', [$ownerDisplayName, $filename]); |
| 398 |
|
} else { |
| 399 |
|
$text= $this->l->t('%s shared »%s« with you on behalf of %s.', [$ownerDisplayName, $filename, $initiator]); |
| 400 |
|
} |
| 401 |
|
$emailTemplate->addBodyText( |
| 402 |
|
$text . ' ' . $this->l->t('Click the button below to open it.'), |
| 403 |
|
$text |