| @@ 720-724 (lines=5) @@ | ||
| 717 | ||
| 718 | $result = Request::setWebhook($url, $path_certificate); |
|
| 719 | ||
| 720 | if (!$result->isOk()) { |
|
| 721 | throw new TelegramException( |
|
| 722 | 'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 723 | ); |
|
| 724 | } |
|
| 725 | ||
| 726 | return $result; |
|
| 727 | } |
|
| @@ 739-743 (lines=5) @@ | ||
| 736 | { |
|
| 737 | $result = Request::setWebhook(); |
|
| 738 | ||
| 739 | if (!$result->isOk()) { |
|
| 740 | throw new TelegramException( |
|
| 741 | 'Webhook was not unset! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription() |
|
| 742 | ); |
|
| 743 | } |
|
| 744 | ||
| 745 | return $result; |
|
| 746 | } |
|