| @@ 745-749 (lines=5) @@ | ||
| 742 | ||
| 743 | $result = Request::setWebhook($url, $path_certificate); |
|
| 744 | ||
| 745 | if (!$result->isOk()) { |
|
| 746 | throw new TelegramException( |
|
| 747 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 748 | ); |
|
| 749 | } |
|
| 750 | ||
| 751 | return $result; |
|
| 752 | } |
|
| @@ 764-768 (lines=5) @@ | ||
| 761 | { |
|
| 762 | $result = Request::setWebhook(); |
|
| 763 | ||
| 764 | if (!$result->isOk()) { |
|
| 765 | throw new TelegramException( |
|
| 766 | 'Webhook was not unset! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 767 | ); |
|
| 768 | } |
|
| 769 | ||
| 770 | return $result; |
|
| 771 | } |
|