1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-23 06:13:54 +01:00

Reinit auth as needed

This commit is contained in:
Daniil Gentili 2023-09-30 21:04:40 +02:00
parent 54c935a3ca
commit 552656da12
2 changed files with 4 additions and 6 deletions

View File

@ -76,13 +76,10 @@ class SecretHandler extends SimpleEventHandler
#[Handler]
public function handle(Incoming&SecretMessage $message): void
{
if(isset($message->media))
if ($message->media)
{
$path = $message->media->downloadToDir('/tmp');
$this->sendPhoto(
peer: $message->senderId,
file: $message->media
);
$path = $message->media->downloadToDir('/tmp');
$message->reply($path);
}
/*if (isset($this->sent[$update->chatId])) {
return;

View File

@ -1206,6 +1206,7 @@ final class MTProto implements TLCallback, LoggerGetter
}
if ($auth_key) {
$socket->setTempAuthKey(null);
EventLoop::queue($socket->initAuthorization(...));
}
}
}