mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:59:02 +01:00
Fixes
This commit is contained in:
parent
0facd404ec
commit
8fd999c6fd
@ -104,6 +104,10 @@ class WriteLoop extends ResumableSignalLoop
|
||||
if ($message->isEncrypted()) {
|
||||
continue;
|
||||
}
|
||||
if ($message->getState() & OutgoingMessage::STATE_REPLIED) {
|
||||
unset($connection->pendingOutgoing[$k]);
|
||||
continue;
|
||||
}
|
||||
$skipped_all = false;
|
||||
$API->logger->logger("Sending $message as unencrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE);
|
||||
$message_id = $message->getMsgId() ?? $connection->msgIdHandler->generateMessageId();
|
||||
|
@ -1245,12 +1245,14 @@ class MTProto extends AsyncConstruct implements TLCallback
|
||||
}
|
||||
// Connect to all DCs, start internal loops
|
||||
yield from $this->connectToAllDcs();
|
||||
$this->startLoops();
|
||||
if (yield from $this->fullGetSelf()) {
|
||||
$this->authorized = self::LOGGED_IN;
|
||||
$this->setupLogger();
|
||||
$this->startLoops();
|
||||
yield from $this->getCdnConfig($this->datacenter->curdc);
|
||||
yield from $this->initAuthorization();
|
||||
} else {
|
||||
$this->startLoops();
|
||||
}
|
||||
// onStart event handler
|
||||
if ($this->event_handler && \class_exists($this->event_handler) && \is_subclass_of($this->event_handler, EventHandler::class)) {
|
||||
|
@ -178,7 +178,7 @@ class OutgoingMessage extends Message
|
||||
public function sent(): void
|
||||
{
|
||||
if ($this->state & self::STATE_REPLIED) {
|
||||
throw new Exception("Trying to resend already replied message $this!");
|
||||
//throw new Exception("Trying to resend already replied message $this!");
|
||||
}
|
||||
$this->state |= self::STATE_SENT;
|
||||
$this->sent = \time();
|
||||
|
Loading…
Reference in New Issue
Block a user