Merge remote
This commit is contained in:
commit
c1e2c93af7
@ -580,7 +580,6 @@ trait AuthKeyHandler
|
|||||||
$this->updates_state['sync_loading'] = false;
|
$this->updates_state['sync_loading'] = false;
|
||||||
$this->handle_pending_updates();
|
$this->handle_pending_updates();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sync_authorization($id)
|
public function sync_authorization($id)
|
||||||
|
@ -133,7 +133,6 @@ trait TL
|
|||||||
$key++;
|
$key++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
foreach ($TL_dict['constructors'] as $key => $value) {
|
foreach ($TL_dict['constructors'] as $key => $value) {
|
||||||
$TL_dict['constructors'][$key]['id'] = $this->pack_signed_int($TL_dict['constructors'][$key]['id']);
|
$TL_dict['constructors'][$key]['id'] = $this->pack_signed_int($TL_dict['constructors'][$key]['id']);
|
||||||
}
|
}
|
||||||
@ -315,7 +314,7 @@ trait TL
|
|||||||
throw new Exception(\danog\MadelineProto\Lang::$current_lang['array_invalid']);
|
throw new Exception(\danog\MadelineProto\Lang::$current_lang['array_invalid']);
|
||||||
}
|
}
|
||||||
if (isset($object['_'])) {
|
if (isset($object['_'])) {
|
||||||
throw new Exception('You must provide an array of '.$type['subtype']." objects, not a ".$type['subtype']." object. Example: [['_' => ".$type['subtype'].", ... ]]");
|
throw new Exception('You must provide an array of '.$type['subtype'].' objects, not a '.$type['subtype']." object. Example: [['_' => ".$type['subtype'].', ... ]]');
|
||||||
}
|
}
|
||||||
$concat = $this->constructors->find_by_predicate('vector')['id'];
|
$concat = $this->constructors->find_by_predicate('vector')['id'];
|
||||||
$concat .= $this->pack_unsigned_int(count($object));
|
$concat .= $this->pack_unsigned_int(count($object));
|
||||||
|
@ -34,10 +34,12 @@ trait TOS
|
|||||||
$this->logger->logger('By declining the TOS, the currently logged in account will be PERMANENTLY DELETED.', \danog\MadelineProto\Logger::FATAL_ERROR);
|
$this->logger->logger('By declining the TOS, the currently logged in account will be PERMANENTLY DELETED.', \danog\MadelineProto\Logger::FATAL_ERROR);
|
||||||
$this->logger->logger('Read the following TOS very carefully: ', \danog\MadelineProto\Logger::ERROR);
|
$this->logger->logger('Read the following TOS very carefully: ', \danog\MadelineProto\Logger::ERROR);
|
||||||
$this->logger->logger($this->tos);
|
$this->logger->logger($this->tos);
|
||||||
|
|
||||||
throw new \danog\MadelineProto\Exception('TOS action required, check the logs', 0, null, 'MadelineProto', 1);
|
throw new \danog\MadelineProto\Exception('TOS action required, check the logs', 0, null, 'MadelineProto', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function accept_tos()
|
public function accept_tos()
|
||||||
{
|
{
|
||||||
$this->tos['accepted'] = $this->method_call('help.acceptTermsOfService', ['id' => $this->tos['terms_of_service']['id']], ['datacenter' => $this->datacenter->curdc]);
|
$this->tos['accepted'] = $this->method_call('help.acceptTermsOfService', ['id' => $this->tos['terms_of_service']['id']], ['datacenter' => $this->datacenter->curdc]);
|
||||||
@ -47,6 +49,7 @@ trait TOS
|
|||||||
throw new \danog\MadelineProto\Exception('An error occurred while accepting the TOS');
|
throw new \danog\MadelineProto\Exception('An error occurred while accepting the TOS');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function decline_tos()
|
public function decline_tos()
|
||||||
{
|
{
|
||||||
$this->method_call('account.deleteAccount', ['reason' => 'Decline ToS update'], ['datacenter' => $this->datacenter->curdc]);
|
$this->method_call('account.deleteAccount', ['reason' => 'Decline ToS update'], ['datacenter' => $this->datacenter->curdc]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user