mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 04:35:12 +01:00
Fixes
This commit is contained in:
parent
f4a268ffd6
commit
3b981c1fe1
@ -171,6 +171,7 @@ abstract class DriverArray implements DbArray, IteratorAggregate
|
||||
Logger::log("Loading data to table {$newName}: $counter/$total", Logger::WARNING);
|
||||
}
|
||||
}
|
||||
if ($promises) await($promises);
|
||||
if (self::getMigrationName($new, false) !== self::getMigrationName($old, false)) {
|
||||
Logger::log("Dropping data from table {$oldName}", Logger::WARNING);
|
||||
$old->clear();
|
||||
|
@ -850,12 +850,22 @@ final class MTProto implements TLCallback, LoggerGetter
|
||||
$this->chats,
|
||||
$this->full_chats,
|
||||
);
|
||||
DbPropertiesFactory::get(
|
||||
// Todo for when the username db is global
|
||||
/*DbPropertiesFactory::get(
|
||||
$this->settings->getDb(),
|
||||
$this->getDbPrefix().'_MTProto_usernames',
|
||||
['innerMadelineProto' => true],
|
||||
$this->usernames
|
||||
)->clear();
|
||||
)->clear();*/
|
||||
}
|
||||
|
||||
if (!isset($this->TL)) {
|
||||
$this->TL = new TL($this);
|
||||
$callbacks = [$this, $this->referenceDatabase];
|
||||
if (!($this->authorization['user']['bot'] ?? false)) {
|
||||
$callbacks[] = $this->minDatabase;
|
||||
}
|
||||
$this->TL->init($this->settings->getSchema(), $callbacks);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user