mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 01:14:39 +01:00
Fix upgrades
This commit is contained in:
parent
69fb21478a
commit
2a7e4f7833
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit 34769aac6fa12a654ba8a1b88deaf08652c17928
|
||||
Subproject commit 3a06041168b8d69b31e5de5c555d3c89a9042f6b
|
@ -186,7 +186,7 @@ final class InternalState
|
||||
}
|
||||
}
|
||||
});
|
||||
if (count($promises) % 50 === 0) {
|
||||
if (\count($promises) % 50 === 0) {
|
||||
await($promises);
|
||||
$promises = [];
|
||||
}
|
||||
|
@ -90,16 +90,21 @@ abstract class DriverArray implements DbArray, IteratorAggregate
|
||||
));
|
||||
}
|
||||
|
||||
private bool $old = true;
|
||||
public function __wakeup(): void
|
||||
{
|
||||
Magic::start(light: true);
|
||||
$this->setSettings($this->dbSettings);
|
||||
if ($this->old) {
|
||||
$this->setSerializer(SerializerType::SERIALIZE);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getInstance(string $table, DbType|array|null $previous, DatabaseAbstract $settings): static
|
||||
{
|
||||
/** @var MysqlArray|PostgresArray|RedisArray */
|
||||
$instance = new static();
|
||||
$instance->old = false;
|
||||
$instance->setTable($table);
|
||||
|
||||
$instance->setSettings($settings);
|
||||
|
@ -1539,6 +1539,8 @@ abstract class InternalDoc
|
||||
/**
|
||||
* Subscribe to event handler updates for a channel/supergroup we're not a member of.
|
||||
*
|
||||
* @param mixed $channel Channel/supergroup to subscribe to
|
||||
*
|
||||
* @return bool False if we were already subscribed
|
||||
*/
|
||||
public function subscribeToUpdates(mixed $channel): bool
|
||||
|
@ -314,7 +314,7 @@ final class Logger
|
||||
if (!self::$printed) {
|
||||
self::$printed = true;
|
||||
$this->colors[self::NOTICE] = \implode(';', [self::FOREGROUND['light_gray'], self::SET['bold'], self::BACKGROUND['blue']]);
|
||||
$this->logger('MadelineProto');
|
||||
$this->logger('MadelineProto '.MTProto::RELEASE);
|
||||
$this->logger('Copyright (C) 2016-'.\date('Y').' Daniil Gentili');
|
||||
$this->logger('Licensed under AGPLv3');
|
||||
$this->logger('https://github.com/danog/MadelineProto');
|
||||
|
@ -139,7 +139,7 @@ final class MTProto implements TLCallback, LoggerGetter
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const RELEASE = '8.0';
|
||||
const RELEASE = '8.0.0-beta84';
|
||||
/**
|
||||
* We're not logged in.
|
||||
*
|
||||
|
@ -457,6 +457,8 @@ trait UpdateHandler
|
||||
/**
|
||||
* Subscribe to event handler updates for a channel/supergroup we're not a member of.
|
||||
*
|
||||
* @param mixed $channel Channel/supergroup to subscribe to
|
||||
*
|
||||
* @return bool False if we were already subscribed
|
||||
*/
|
||||
public function subscribeToUpdates(mixed $channel): bool
|
||||
|
Loading…
Reference in New Issue
Block a user