|
@@ 48-62 (lines=15) @@
|
| 45 |
|
* @param bool $disableNotifications |
| 46 |
|
* @param string $parseMode |
| 47 |
|
*/ |
| 48 |
|
public function sendMassTemplatedMessage( |
| 49 |
|
array $accounts, |
| 50 |
|
string $template, |
| 51 |
|
array $templateData = [], |
| 52 |
|
KeyboardMethods $keyboardMarkup = null, |
| 53 |
|
bool $disableWebPreview = true, |
| 54 |
|
bool $disableNotifications = false, |
| 55 |
|
string $parseMode = self::PARSE_MARKDOWN |
| 56 |
|
) { |
| 57 |
|
$text = $this->twig->render($template, $templateData); |
| 58 |
|
|
| 59 |
|
foreach ($accounts as $account) { |
| 60 |
|
$this->sendMessage($account, $text, $parseMode, $keyboardMarkup, $disableWebPreview, $disableNotifications); |
| 61 |
|
} |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
public function sendTemplatedMessage( |
| 65 |
|
Account $account, |
|
@@ 64-76 (lines=13) @@
|
| 61 |
|
} |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
public function sendTemplatedMessage( |
| 65 |
|
Account $account, |
| 66 |
|
string $template, |
| 67 |
|
array $templateData = [], |
| 68 |
|
KeyboardMethods $keyboardMarkup = null, |
| 69 |
|
bool $disableWebPreview = true, |
| 70 |
|
bool $disableNotifications = false, |
| 71 |
|
string $parseMode = self::PARSE_MARKDOWN |
| 72 |
|
): bool { |
| 73 |
|
$text = $this->twig->render($template, $templateData); |
| 74 |
|
|
| 75 |
|
return $this->sendMessage($account, $text, $parseMode, $keyboardMarkup, $disableWebPreview, $disableNotifications); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
public function sendMessage( |
| 79 |
|
Account $account, |