mirror of
https://github.com/danog/MadelineProto.git
synced 2024-12-11 08:19:38 +01:00
Fix
This commit is contained in:
parent
b3f1624c6a
commit
b079223deb
@ -24,6 +24,7 @@ use danog\MadelineProto\Logger;
|
|||||||
use danog\MadelineProto\Loop\Update\SecretFeedLoop;
|
use danog\MadelineProto\Loop\Update\SecretFeedLoop;
|
||||||
use danog\MadelineProto\Loop\Update\UpdateLoop;
|
use danog\MadelineProto\Loop\Update\UpdateLoop;
|
||||||
use danog\MadelineProto\MTProtoTools\Crypt;
|
use danog\MadelineProto\MTProtoTools\Crypt;
|
||||||
|
use danog\MadelineProto\MTProtoTools\DialogId;
|
||||||
use danog\MadelineProto\PeerNotInDbException;
|
use danog\MadelineProto\PeerNotInDbException;
|
||||||
use danog\MadelineProto\RPCErrorException;
|
use danog\MadelineProto\RPCErrorException;
|
||||||
use danog\MadelineProto\SecurityException;
|
use danog\MadelineProto\SecurityException;
|
||||||
@ -316,6 +317,9 @@ trait AuthKeyHandler
|
|||||||
*/
|
*/
|
||||||
public function getSecretChat(array|int $chat): array
|
public function getSecretChat(array|int $chat): array
|
||||||
{
|
{
|
||||||
|
if (is_int($chat) && DialogId::isSecretChat($chat)) {
|
||||||
|
$chat = DialogId::toSecretChatId($chat);
|
||||||
|
}
|
||||||
return $this->secret_chats[\is_array($chat) ? $chat['chat_id'] : $chat];
|
return $this->secret_chats[\is_array($chat) ? $chat['chat_id'] : $chat];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user