| @@ 230-247 (lines=18) @@ | ||
| 227 | * @param array $links |
|
| 228 | * @param string $password |
|
| 229 | */ |
|
| 230 | private function memberIsMailbox(DeprecatedCircle $circle, string $recipient, array $links, string $password) { |
|
| 231 | if ($circle->getViewer() === null) { |
|
| 232 | $author = $circle->getOwner() |
|
| 233 | ->getUserId(); |
|
| 234 | } else { |
|
| 235 | $author = $circle->getViewer() |
|
| 236 | ->getUserId(); |
|
| 237 | } |
|
| 238 | ||
| 239 | try { |
|
| 240 | $template = $this->generateMailExitingShares($author, $circle->getName()); |
|
| 241 | $this->fillMailExistingShares($template, $links); |
|
| 242 | $this->sendMailExistingShares($template, $author, $recipient); |
|
| 243 | $this->sendPasswordExistingShares($author, $recipient, $password); |
|
| 244 | } catch (Exception $e) { |
|
| 245 | $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||
| 249 | ||
| 250 | /** |
|
| @@ 625-644 (lines=20) @@ | ||
| 622 | * @param array $links |
|
| 623 | * @param string $password |
|
| 624 | */ |
|
| 625 | private function memberIsMailbox( |
|
| 626 | DeprecatedCircle $circle, string $recipient, array $links, string $password |
|
| 627 | ) { |
|
| 628 | if ($circle->getViewer() === null) { |
|
| 629 | $author = $circle->getOwner() |
|
| 630 | ->getUserId(); |
|
| 631 | } else { |
|
| 632 | $author = $circle->getViewer() |
|
| 633 | ->getUserId(); |
|
| 634 | } |
|
| 635 | ||
| 636 | try { |
|
| 637 | $template = $this->generateMailExitingShares($author, $circle->getName()); |
|
| 638 | $this->fillMailExistingShares($template, $links); |
|
| 639 | $this->sendMailExistingShares($template, $author, $recipient); |
|
| 640 | $this->sendPasswordExistingShares($author, $recipient, $password); |
|
| 641 | } catch (Exception $e) { |
|
| 642 | $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
| 643 | } |
|
| 644 | } |
|
| 645 | ||
| 646 | ||
| 647 | /** |
|