. * * @author Daniil Gentili * @copyright 2016-2019 Daniil Gentili * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 * * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\Wrappers; /** * Manages logging in and out. */ trait Webhook { public function setWebhook($hook_url, $pem_path = null) { $this->pem_path = $pem_path; $this->hook_url = $hook_url; $this->settings['updates']['callback'] = [$this, 'pwrWebhook']; $this->settings['updates']['run_callback'] = true; $this->settings['updates']['handleUpdates'] = true; $this->startUpdateSystem(); } }