| @@ 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 | /** |
|
| @@ 466-485 (lines=20) @@ | ||
| 463 | * @param array $links |
|
| 464 | * @param string $password |
|
| 465 | */ |
|
| 466 | private function memberIsMailbox( |
|
| 467 | DeprecatedCircle $circle, string $recipient, array $links, string $password |
|
| 468 | ) { |
|
| 469 | if ($circle->getViewer() === null) { |
|
| 470 | $author = $circle->getOwner() |
|
| 471 | ->getUserId(); |
|
| 472 | } else { |
|
| 473 | $author = $circle->getViewer() |
|
| 474 | ->getUserId(); |
|
| 475 | } |
|
| 476 | ||
| 477 | try { |
|
| 478 | $template = $this->generateMailExitingShares($author, $circle->getName()); |
|
| 479 | $this->fillMailExistingShares($template, $links); |
|
| 480 | $this->sendMailExistingShares($template, $author, $recipient); |
|
| 481 | $this->sendPasswordExistingShares($author, $recipient, $password); |
|
| 482 | } catch (Exception $e) { |
|
| 483 | $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
| 484 | } |
|
| 485 | } |
|
| 486 | ||
| 487 | ||
| 488 | /** |
|