1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 06:59:01 +01:00

Fixe peer database

This commit is contained in:
Daniil Gentili 2024-04-11 20:19:19 +02:00
parent 47410fb46c
commit 18118a2807

View File

@ -57,17 +57,17 @@ final class PeerDatabase implements TLCallback
*
* @var DbArray<int, array>
*/
#[OrmMappedArray(KeyType::INT, ValueType::SCALAR, tablePostfix: 'MTProto_chats')]
#[OrmMappedArray(KeyType::INT, ValueType::SCALAR, tablePostfix: '_MTProto_chats')]
private $db;
/**
* @var DbArray<int, array>
*/
#[OrmMappedArray(KeyType::INT, ValueType::SCALAR, tablePostfix: 'MTProto_full_chats')]
#[OrmMappedArray(KeyType::INT, ValueType::SCALAR, tablePostfix: '_MTProto_full_chats')]
private $fullDb;
/**
* @var DbArray<string, int>
*/
#[OrmMappedArray(KeyType::STRING, ValueType::INT)]
#[OrmMappedArray(KeyType::STRING, ValueType::INT, tablePostfix: '_PeerDatabase_usernames')]
private $usernames;
private bool $hasInfo = true;
private bool $hasUsernames = true;
@ -95,7 +95,7 @@ final class PeerDatabase implements TLCallback
}
public function init(): void
{
$this->initDbProperties($this->API->getDbSettings(), $this->API->getDbPrefix().'_PeerDatabase_');
$this->initDbProperties($this->API->getDbSettings(), $this->API->getDbPrefix());
if (!$this->API->settings->getDb()->getEnableFullPeerDb()) {
$this->fullDb->clear();
}