mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 10:11:13 +01:00
Reinit auth as needed
This commit is contained in:
parent
54c935a3ca
commit
552656da12
@ -76,13 +76,10 @@ class SecretHandler extends SimpleEventHandler
|
|||||||
#[Handler]
|
#[Handler]
|
||||||
public function handle(Incoming&SecretMessage $message): void
|
public function handle(Incoming&SecretMessage $message): void
|
||||||
{
|
{
|
||||||
if(isset($message->media))
|
if ($message->media)
|
||||||
{
|
{
|
||||||
$path = $message->media->downloadToDir('/tmp');
|
$path = $message->media->downloadToDir('/tmp');
|
||||||
$this->sendPhoto(
|
$message->reply($path);
|
||||||
peer: $message->senderId,
|
|
||||||
file: $message->media
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
/*if (isset($this->sent[$update->chatId])) {
|
/*if (isset($this->sent[$update->chatId])) {
|
||||||
return;
|
return;
|
||||||
|
@ -1206,6 +1206,7 @@ final class MTProto implements TLCallback, LoggerGetter
|
|||||||
}
|
}
|
||||||
if ($auth_key) {
|
if ($auth_key) {
|
||||||
$socket->setTempAuthKey(null);
|
$socket->setTempAuthKey(null);
|
||||||
|
EventLoop::queue($socket->initAuthorization(...));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user