1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 21:14:43 +01:00

Fixe peer database

This commit is contained in:
Daniil Gentili 2024-04-11 20:19:19 +02:00
parent 0c25881c27
commit 2d03f871ee

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();
}