mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 03:14:39 +01:00
Magnaluna bugfix
This commit is contained in:
commit
f63065f1f3
2
bot.php
2
bot.php
@ -63,7 +63,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
$settings = ['logger' => ['logger_level' => 5]];
|
||||
$settings = ['logger' => ['logger_level' => 5], 'serialization' => ['serialization_interval' => 30, 'cleanup_before_serialization' => true]];
|
||||
|
||||
$MadelineProto = new \danog\MadelineProto\API('bot.madeline', $settings);
|
||||
$MadelineProto->async(true);
|
||||
|
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit 11f1a298b7d50a1ee6a71bd5bbd61f40fc288100
|
||||
Subproject commit c60f59ffe2ee74d6fb50cd96651e4ae234dbb6ea
|
@ -127,7 +127,7 @@ trait AuthKeyHandler
|
||||
$this->check_G($params['g_b'], $dh_config['p']);
|
||||
$key = \str_pad($params['g_b']->powMod($this->calls[$params['id']]->storage['a'], $dh_config['p'])->toBytes(), 256, \chr(0), \STR_PAD_LEFT);
|
||||
try {
|
||||
$res = yield $this->method_call_async_read('phone.confirmCall', ['key_fingerprint' => \substr(\sha1($key, true), -8), 'peer' => ['id' => $params['id'], 'access_hash' => $params['access_hash'], '_' => 'inputPhoneCall'], 'g_a' => $this->calls[$params['id']]->storage['g_a'], 'protocol' => ['_' => 'phoneCallProtocol', 'udp_reflector' => true, 'min_layer' => 65, 'max_layer' => \danog\MadelineProto\VoIP::getConnectionMaxLayer()]], ['datacenter' => $this->datacenter->curdc])['phone_call'];
|
||||
$res = (yield $this->method_call_async_read('phone.confirmCall', ['key_fingerprint' => \substr(\sha1($key, true), -8), 'peer' => ['id' => $params['id'], 'access_hash' => $params['access_hash'], '_' => 'inputPhoneCall'], 'g_a' => $this->calls[$params['id']]->storage['g_a'], 'protocol' => ['_' => 'phoneCallProtocol', 'udp_reflector' => true, 'min_layer' => 65, 'max_layer' => \danog\MadelineProto\VoIP::getConnectionMaxLayer()]], ['datacenter' => $this->datacenter->curdc]))['phone_call'];
|
||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||
if ($e->rpc === 'CALL_ALREADY_ACCEPTED') {
|
||||
$this->logger->logger(\sprintf(\danog\MadelineProto\Lang::$current_lang['call_already_accepted'], $call['id']));
|
||||
|
Loading…
Reference in New Issue
Block a user