mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 07:14:39 +01:00
danog
This commit is contained in:
parent
d278293589
commit
af1df14fc3
@ -80,7 +80,12 @@ class Lua
|
||||
if (is_callable($cb)) {
|
||||
$cb($result, $cb_extra);
|
||||
}
|
||||
array_walk_recursive($result, function (&$value, $key) { if ($value instanceof \danog\MadelineProto\TL\Types\Button) $value = $value->jsonSerialize(); });
|
||||
array_walk_recursive($result, function (&$value, $key) {
|
||||
if ($value instanceof \danog\MadelineProto\TL\Types\Button) {
|
||||
$value = $value->jsonSerialize();
|
||||
}
|
||||
});
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ trait UpdateHandler
|
||||
switch ($update['phone_call']['_']) {
|
||||
case 'phoneCallRequested':
|
||||
return $this->accept_call($update['phone_call']);
|
||||
|
||||
|
||||
case 'phoneCallAccepted':
|
||||
$this->confirm_call($update['phone_call']);
|
||||
|
||||
|
@ -48,6 +48,7 @@ trait AuthKeyHandler
|
||||
|
||||
$this->handle_pending_updates();
|
||||
$this->get_updates_difference();
|
||||
|
||||
return $controller;
|
||||
}
|
||||
|
||||
@ -99,19 +100,19 @@ trait AuthKeyHandler
|
||||
|
||||
$this->calls[$params['id']]->configuration = array_merge([
|
||||
'config' => [
|
||||
'recv_timeout' => $this->config['call_receive_timeout_ms'] / 1000,
|
||||
'init_timeout' => $this->config['call_connect_timeout_ms'] / 1000,
|
||||
'data_saving' => \danog\MadelineProto\VoIP::DATA_SAVING_NEVER,
|
||||
'enable_NS' => true,
|
||||
'enable_AEC' => true,
|
||||
'enable_AGC' => true,
|
||||
'log_file_path' => $this->settings['calls']['log_file_path'],
|
||||
'stats_dump_file_path' => $this->settings['calls']['stats_dump_file_path']
|
||||
'recv_timeout' => $this->config['call_receive_timeout_ms'] / 1000,
|
||||
'init_timeout' => $this->config['call_connect_timeout_ms'] / 1000,
|
||||
'data_saving' => \danog\MadelineProto\VoIP::DATA_SAVING_NEVER,
|
||||
'enable_NS' => true,
|
||||
'enable_AEC' => true,
|
||||
'enable_AGC' => true,
|
||||
'log_file_path' => $this->settings['calls']['log_file_path'],
|
||||
'stats_dump_file_path' => $this->settings['calls']['stats_dump_file_path'],
|
||||
],
|
||||
'auth_key' => $key['auth_key'],
|
||||
'network_type' => $this->settings['calls']['network_type'],
|
||||
'auth_key' => $key['auth_key'],
|
||||
'network_type' => $this->settings['calls']['network_type'],
|
||||
'shared_config' => $this->method_call('phone.getCallConfig', [], ['datacenter' => $this->datacenter->curdc]),
|
||||
'endpoints' => array_merge([$res['connection']], $res['alternative_connections']),
|
||||
'endpoints' => array_merge([$res['connection']], $res['alternative_connections']),
|
||||
], $this->calls[$params['id']]->configuration);
|
||||
$this->calls[$params['id']]->parseConfig();
|
||||
$this->calls[$params['id']]->startTheMagic();
|
||||
@ -190,6 +191,7 @@ trait AuthKeyHandler
|
||||
$controller->discard();
|
||||
}
|
||||
}
|
||||
|
||||
return $this->calls[$call];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user