1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 13:14:40 +01:00
This commit is contained in:
Daniil Gentili 2017-05-31 20:59:52 +01:00
parent a6e456b253
commit f601aab2d0
3 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ trait ResponseHandler
foreach ($this->datacenter->sockets[$datacenter]->new_incoming as $current_msg_id) {
$unset = false;
\danog\MadelineProto\Logger::log(['Received '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_'].'.'], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
\danog\MadelineProto\Logger::log([$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
//\danog\MadelineProto\Logger::log([$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
if (\danog\MadelineProto\Logger::$has_thread && is_object(\Thread::getCurrentThread())) {
if (!$this->synchronized(function ($zis, $datacenter, $current_msg_id) {
if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['handling'])) {

View File

@ -124,7 +124,7 @@ trait UpdateHandler
public function get_channel_difference($channel)
{
if (!$this->settings['updates']['handle_updates']) {
if (!$this->settings['updates']['handle_updates'] || $this->getting_state) {
return;
}
if (!$this->get_channel_state($channel)['sync_loading']) {
@ -225,7 +225,7 @@ trait UpdateHandler
public function get_updates_difference()
{
if (!$this->settings['updates']['handle_updates']) {
if (!$this->settings['updates']['handle_updates'] || $this->getting_state) {
return;
}
if (!$this->get_update_state()['sync_loading']) {

View File

@ -21,7 +21,7 @@ class Button extends \Volatile implements \JsonSerializable
public function ___construct($API, $message, $button)
{
$this->data = $button;
$this->info['peer'] = $message['to_id'];
$this->info['peer'] = $message['to_id'] === ['_' => 'peerUser', 'user_id' => $API->authorization['user']['id']] ? $message['from_id'] : $message['to_id'];
$this->info['id'] = $message['id'];
$this->info['API'] = $API;
}