This commit is contained in:
Daniil Gentili 2017-05-08 20:10:19 +01:00
commit f933498624
2 changed files with 7 additions and 2 deletions

View File

@ -357,7 +357,12 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
'allow_threading' => false, // Should I use threading, if it is enabled? 'allow_threading' => false, // Should I use threading, if it is enabled?
'handler_workers' => 10, // How many workers should every message handler pool of each socket reader have 'handler_workers' => 10, // How many workers should every message handler pool of each socket reader have
], ],
'pwr' => ['pwr' => false, 'db_token' => false, 'strict' => false, 'requests' => true], 'pwr' => [
'pwr' => false, // Need info ?
'db_token' => false, // Need info ?
'strict' => false, // Need info ?
'requests' => true, // Should I get info about unknown peers from PWRTelegram?
],
]; ];
$settings = $this->array_replace_recursive($default_settings, $settings); $settings = $this->array_replace_recursive($default_settings, $settings);
if (!isset($settings['app_info']['api_id'])) { if (!isset($settings['app_info']['api_id'])) {

View File

@ -211,7 +211,7 @@ trait PeerHandler
return $this->gen_all($this->chats[$id]); return $this->gen_all($this->chats[$id]);
} }
} }
if (!isset($this->settings['pwr']['request']) || $this->settings['pwr']['requests'] === true) { if (!isset($this->settings['pwr']['requests']) || $this->settings['pwr']['requests'] === true) {
$dbres = json_decode(file_get_contents('https://id.pwrtelegram.xyz/db/getusername?id='.$id, false, stream_context_create(['http'=> [ $dbres = json_decode(file_get_contents('https://id.pwrtelegram.xyz/db/getusername?id='.$id, false, stream_context_create(['http'=> [
'timeout' => 2, 'timeout' => 2,
], ],