Fixing stuff

This commit is contained in:
Daniil Gentili 2019-06-05 15:56:59 +02:00
parent 08a502cb2f
commit 1e24296268
3 changed files with 8 additions and 5 deletions

View File

@ -31,6 +31,7 @@ You can use MadelineProto with PHP 7.3 (or PHP 7.2, PHP 7.1 is supported but not
* You can now use the `@support` username in sendMessage and other methods to send messages to the support user!
* Now MadelineProto will automatically try to get the access hash of users not present in the internal peer database (this should reduce errors)!
* If any file cannot be downloaded to due issues with the tg media server that is hosting it, it will be automatically sent to the `@support` user ([settings](https://docs.madelineproto.xyz/docs/SETTINGS.html#settingsdownloadreport_broken_media)).
* Documented the [MyTelegramOrgWrapper](https://docs.madelineproto.xyz/docs/LOGIN.html#api-id) API, that can be used to login programmaticaly to the [my.telegram.org](https://my.telegram.org management page).
* Added an [update_2fa](https://docs.madelineproto.xyz/update_2fa.html) method to update the login password
* Added a [get_full_dialogs](https://docs.madelineproto.xyz/docs/DIALOGS.html#get_full_dialogs-now-fully-async) method to get a full list of all chats youre member of, including dialog info (such as the pinned/last message ID, unread count, tag count, notification settings and message drafts).
* [Added support for automatic file uploads by name in secret chats (as with normal chats); you can also now send secret chat messages using the sendMessage method as if it were a normal chat](https://github.com/danog/MadelineProto/blob/master/secret_bot.php)
@ -141,6 +142,8 @@ In
* improved callfork
* new logging
* async construct
* async readline
* async filegetco
Things to expect in the next releases:
docs for get mime funcs

2
docs

@ -1 +1 @@
Subproject commit 04a2ff69f3524e7ce684791cd51614e9261c4d82
Subproject commit 67df53f4660009faa7e01fb5cfce2a9751c8ac72

View File

@ -33,15 +33,15 @@ class MyTelegramOrgWrapper
private $number;
private $creation_hash;
private $settings;
public $async = false;
private $async = true;
const MY_TELEGRAM_URL = 'https://my.telegram.org';
public function __sleep()
{
return ['logged', 'hash', 'token', 'number', 'creation_hash', 'settings'];
return ['logged', 'hash', 'token', 'number', 'creation_hash', 'settings', 'async'];
}
public function __construct($settings)
public function __construct($settings = [])
{
if (!isset($settings['all'])) {
$settings['connection_settings'] = ['all' => [
@ -128,7 +128,7 @@ class MyTelegramOrgWrapper
return $this->logged = true;
}
public function logged_in()
public function logged_in_async()
{
return $this->logged;
}