Merge branch 'master' of github.com:danog/MadelineProto

This commit is contained in:
Daniil Gentili 2019-12-29 13:20:48 +01:00
commit 44d18f24a2
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 3 additions and 3 deletions

2
docs

@ -1 +1 @@
Subproject commit 757d12fbdda97d22a20d565be8e0aea64ed34cad Subproject commit fb62113c6b73f49e6d84849731cbe3f705d03647

View File

@ -80,7 +80,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler
if ($update['message']['message'] === '/start') { if ($update['message']['message'] === '/start') {
return $this->messages->sendMessage(['peer' => $peerId, 'message' => self::START, 'parse_mode' => 'Markdown', 'reply_to_msg_id' => $update['message']['id']]); return $this->messages->sendMessage(['peer' => $peerId, 'message' => self::START, 'parse_mode' => 'Markdown', 'reply_to_msg_id' => $update['message']['id']]);
} }
if (isset($update['message']['media'])) { if (isset($update['message']['media']['_']) && $update['message']['media']['_'] !== 'messageMediaWebPage') {
$id = yield $this->messages->sendMessage(['peer' => $peerId, 'message' => 'Give me a new name for this file: ', 'reply_to_msg_id' => $messageId])['id']; $id = yield $this->messages->sendMessage(['peer' => $peerId, 'message' => 'Give me a new name for this file: ', 'reply_to_msg_id' => $messageId])['id'];
$this->states[$peerId] = [$update['message']['media'], $id]; $this->states[$peerId] = [$update['message']['media'], $id];

View File

@ -273,7 +273,7 @@ class DataCenter
} }
foreach ($ctxs as $ctx) { foreach ($ctxs as $ctx) {
try { try {
if ($old && $this->sockets[$dc_number]->hasConnection($id)) { if ($old) {
$this->API->logger->logger("Reconnecting to DC $dc_number ($id) from existing", \danog\MadelineProto\Logger::WARNING); $this->API->logger->logger("Reconnecting to DC $dc_number ($id) from existing", \danog\MadelineProto\Logger::WARNING);
$this->sockets[$dc_number]->setExtra($this->API); $this->sockets[$dc_number]->setExtra($this->API);
yield $this->sockets[$dc_number]->connect($ctx, $id); yield $this->sockets[$dc_number]->connect($ctx, $id);