Bugfix
This commit is contained in:
parent
5344f8d586
commit
4f28c22a4b
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit b6152298e377fe696e67971d889833fa1f36da8e
|
||||
Subproject commit 916411226dd921657305ee7c344c870f6800f479
|
@ -147,6 +147,7 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p
|
||||
if ($update['message']['out'] || $update['message']['to_id']['_'] !== 'peerUser' || !isset($update['message']['from_id'])) {
|
||||
return;
|
||||
}
|
||||
\danog\MadelineProto\Logger::log($update);
|
||||
$chat_id = $from_id = $this->get_info($update)['bot_api_id'];
|
||||
$message = isset($update['message']['message']) ? $update['message']['message'] : '';
|
||||
$this->handleMessage($chat_id, $from_id, $message);
|
||||
@ -193,7 +194,10 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function onAny($update)
|
||||
{
|
||||
\danog\MadelineProto\Logger::log($update);
|
||||
}
|
||||
public function onLoop()
|
||||
{
|
||||
foreach ($this->programmed_call as $key => $pair) {
|
||||
|
@ -383,7 +383,7 @@ trait TL
|
||||
|
||||
public function serialize_method($method, $arguments)
|
||||
{
|
||||
if ($method === 'messages.importChatInvite' && isset($arguments['hash']) && preg_match('@(?:t|telegram)\.(?:me|dog)/(joinchat/)?([a-z0-9_-]*)@i', $arguments['hash'], $matches)) {
|
||||
if ($method === 'messages.importChatInvite' && isset($arguments['hash']) && is_string($arguments['hash']) && preg_match('@(?:t|telegram)\.(?:me|dog)/(joinchat/)?([a-z0-9_-]*)@i', $arguments['hash'], $matches)) {
|
||||
if ($matches[1] === '') {
|
||||
$method = 'channels.joinChannel';
|
||||
$arguments['channel'] = $matches[2];
|
||||
@ -391,10 +391,10 @@ trait TL
|
||||
$arguments['hash'] = $matches[2];
|
||||
}
|
||||
}
|
||||
if ($method === 'messages.checkChatInvite' && isset($arguments['hash']) && preg_match('@(?:t|telegram)\.(?:me|dog)/joinchat/([a-z0-9_-]*)@i', $arguments['hash'], $matches)) {
|
||||
if ($method === 'messages.checkChatInvite' && isset($arguments['hash']) && is_string($arguments['hash']) && preg_match('@(?:t|telegram)\.(?:me|dog)/joinchat/([a-z0-9_-]*)@i', $arguments['hash'], $matches)) {
|
||||
$arguments['hash'] = $matches[1];
|
||||
}
|
||||
if ($method === 'channels.joinChannel' && isset($arguments['channel']) && preg_match('@(?:t|telegram)\.(?:me|dog)/(joinchat/)?([a-z0-9_-]*)@i', $arguments['channel'], $matches)) {
|
||||
if ($method === 'channels.joinChannel' && isset($arguments['channel']) && is_string($arguments['channel']) && preg_match('@(?:t|telegram)\.(?:me|dog)/(joinchat/)?([a-z0-9_-]*)@i', $arguments['channel'], $matches)) {
|
||||
if ($matches[1] !== '') {
|
||||
$method = 'messages.importChatInvite';
|
||||
$arguments['hash'] = $matches[2];
|
||||
|
Loading…
Reference in New Issue
Block a user