diff --git a/src/danog/MadelineProto/DataCenter.php b/src/danog/MadelineProto/DataCenter.php index 6926e252..dde7be37 100644 --- a/src/danog/MadelineProto/DataCenter.php +++ b/src/danog/MadelineProto/DataCenter.php @@ -54,6 +54,7 @@ class DataCenter $test = $settings['test_mode'] ? 'test' : 'main'; $ipv6 = $settings['ipv6'] ? 'ipv6' : 'ipv4'; $address = $this->dclist[$test][$ipv6][$dc_number]['ip_address']; + $address = $settings['ipv6'] ? '['.$address.']' : $address; $port = $this->dclist[$test][$ipv6][$dc_number]['port']; if ($settings['protocol'] == 'https') { $subdomain = $this->dclist['ssl_subdomains'][$dc_number].($settings['upload'] ? '-1' : ''); diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index 493dbbca..6465d7a7 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -455,7 +455,7 @@ trait UpdateHandler $update['message']['out'] = true; } \danog\MadelineProto\Logger::log('Saving an update of type '.$update['_'].'...'); - if ($this->settings['pwr']['strict']) { + if (isset($this->settings['pwr']['strict']) && $this->settings['pwr']['strict']) { $this->pwr_update_handler($update); } else { $this->settings['updates']['callback']($update);