| @@ 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 | /** |
|
| @@ 487-506 (lines=20) @@ | ||
| 484 | * @param array $links |
|
| 485 | * @param string $password |
|
| 486 | */ |
|
| 487 | private function memberIsMailbox( |
|
| 488 | DeprecatedCircle $circle, string $recipient, array $links, string $password |
|
| 489 | ) { |
|
| 490 | if ($circle->getViewer() === null) { |
|
| 491 | $author = $circle->getOwner() |
|
| 492 | ->getUserId(); |
|
| 493 | } else { |
|
| 494 | $author = $circle->getViewer() |
|
| 495 | ->getUserId(); |
|
| 496 | } |
|
| 497 | ||
| 498 | try { |
|
| 499 | $template = $this->generateMailExitingShares($author, $circle->getName()); |
|
| 500 | $this->fillMailExistingShares($template, $links); |
|
| 501 | $this->sendMailExistingShares($template, $author, $recipient); |
|
| 502 | $this->sendPasswordExistingShares($author, $recipient, $password); |
|
| 503 | } catch (Exception $e) { |
|
| 504 | $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
| 505 | } |
|
| 506 | } |
|
| 507 | ||
| 508 | ||
| 509 | /** |
|