Webhook fixes

This commit is contained in:
Daniil Gentili 2017-06-15 12:26:03 +01:00
parent dc1f8c8fdd
commit a3138b1e62

View File

@ -48,6 +48,10 @@ trait UpdateHandler
}
*/
if (isset($this->settings['pwr']['update_handler'])) {
if (is_array($this->settings['pwr']['update_handler']) && $this->settings['pwr']['update_handler'][0] === false) $this->settings['pwr']['update_handler'] = $this->settings['pwr']['update_handler'][1];
if (is_string($this->settings['pwr']['update_handler'])) {
return $this->{$this->settings['pwr']['update_handler']}($update);
}
in_array($this->settings['pwr']['update_handler'], [['danog\MadelineProto\API', 'get_updates_update_handler'], 'get_updates_update_handler']) ? $this->get_updates_update_handler($update) : $this->settings['pwr']['update_handler']($update);
}
}