diff --git a/magna.php b/magna.php index d83df733..7aea208c 100755 --- a/magna.php +++ b/magna.php @@ -53,8 +53,8 @@ function configureCall($call) $call->configuration['enable_AEC'] = false; $call->configuration['shared_config'] = [ 'audio_init_bitrate' => 100 * 1000, - 'audio_max_bitrate' => 500 * 1000, - 'audio_min_bitrate' => 100 * 1000, + 'audio_max_bitrate' => 100 * 1000, + 'audio_min_bitrate' => 10 * 1000, 'audio_congestion_window' => 4 * 1024, //'audio_bitrate_step_decr' => 0, //'audio_bitrate_step_incr' => 2000, diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index 243b8165..38e10b26 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -27,26 +27,6 @@ trait UpdateHandler public function pwr_update_handler($update) { - /* - if (isset($update['message']['to_id'])) { - try { - $full_chat = $this->get_pwr_chat($update['message']['to_id']); - } catch (\danog\MadelineProto\Exception $e) { - \danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - \danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } - } - if (isset($update['message']['from_id'])) { - try { - $full_chat = $this->get_pwr_chat($update['message']['from_id']); - } catch (\danog\MadelineProto\Exception $e) { - \danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - \danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } - } - */ 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]; @@ -209,10 +189,10 @@ trait UpdateHandler throw $e; } catch (\danog\MadelineProto\PTSException $e) { + \danog\MadelineProto\Logger::log($e->getMessage()); unset($this->channels_state[$channel]); $this->load_channel_state($channel)['sync_loading'] = false; - - return $this->get_channel_difference($channel); + return false;//$this->get_channel_difference($channel); } finally { $this->postpone_updates = false; $this->load_channel_state($channel)['sync_loading'] = false;