diff --git a/docs b/docs index 930cb07d..1604ea5e 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 930cb07d6f730e8651cfc8e0301b4480746b7922 +Subproject commit 1604ea5e433180ec89d4513a9909114ea280cc7b diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index e91188fc..98fed9e2 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -436,12 +436,11 @@ trait PeerHandler case 'chat': case 'chatForbidden': $res['InputPeer'] = ['_' => 'inputPeerChat', 'chat_id' => $constructor['id']]; - + $res['Peer'] = ['_' => 'peerChat', 'chat_id' => $constructor['id']]; $res['DialogPeer'] = ['_' => 'dialogPeer', 'peer' => $res['Peer']]; $res['NotifyPeer'] = ['_' => 'notifyPeer', 'peer' => $res['Peer']]; $res['InputDialogPeer'] = ['_' => 'inputDialogPeer', 'peer' => $res['InputPeer']]; $res['InputNotifyPeer'] = ['_' => 'inputNotifyPeer', 'peer' => $res['InputPeer']]; - $res['Peer'] = ['_' => 'peerChat', 'chat_id' => $constructor['id']]; $res['chat_id'] = $constructor['id']; $res['bot_api_id'] = -$constructor['id']; $res['type'] = 'chat'; @@ -451,13 +450,12 @@ trait PeerHandler throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database'); } $res['InputPeer'] = ['_' => 'inputPeerChannel', 'channel_id' => $constructor['id'], 'access_hash' => $constructor['access_hash']]; - + $res['Peer'] = ['_' => 'peerChannel', 'channel_id' => $constructor['id']]; $res['DialogPeer'] = ['_' => 'dialogPeer', 'peer' => $res['Peer']]; $res['NotifyPeer'] = ['_' => 'notifyPeer', 'peer' => $res['Peer']]; $res['InputDialogPeer'] = ['_' => 'inputDialogPeer', 'peer' => $res['InputPeer']]; $res['InputNotifyPeer'] = ['_' => 'inputNotifyPeer', 'peer' => $res['InputPeer']]; $res['InputChannel'] = ['_' => 'inputChannel', 'channel_id' => $constructor['id'], 'access_hash' => $constructor['access_hash']]; - $res['Peer'] = ['_' => 'peerChannel', 'channel_id' => $constructor['id']]; $res['channel_id'] = $constructor['id']; $res['bot_api_id'] = $this->to_supergroup($constructor['id']); $res['type'] = $constructor['megagroup'] ? 'supergroup' : 'channel';