mirror of
https://github.com/danog/MadelineProto.git
synced 2024-12-02 12:57:49 +01:00
Fixes
This commit is contained in:
parent
6ab43fac52
commit
d2351f9862
@ -302,7 +302,7 @@ class SecretHandler extends EventHandler
|
|||||||
foreach ($secret_media as $type => $smessage) {
|
foreach ($secret_media as $type => $smessage) {
|
||||||
$promises []= async($this->messages->sendEncryptedFile(...), $smessage);
|
$promises []= async($this->messages->sendEncryptedFile(...), $smessage);
|
||||||
}
|
}
|
||||||
await($promises);
|
var_dump(await($promises));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < 10) {
|
while ($i < 10) {
|
||||||
|
@ -354,7 +354,7 @@ final class SecretChatController implements Stringable
|
|||||||
private function encryptSecretMessageInner(array &$body): void
|
private function encryptSecretMessageInner(array &$body): void
|
||||||
{
|
{
|
||||||
$message = $body['message'];
|
$message = $body['message'];
|
||||||
$message['random_id'] = Tools::randomInt();
|
$randomId = $message['random_id'] = Tools::randomInt();
|
||||||
Assert::true($this->remoteLayer > 8);
|
Assert::true($this->remoteLayer > 8);
|
||||||
$message = ['_' => 'decryptedMessageLayer', 'layer' => $this->remoteLayer, 'in_seq_no' => $this->generateSecretInSeqNo(), 'out_seq_no' => $this->generateSecretOutSeqNo(), 'message' => $message];
|
$message = ['_' => 'decryptedMessageLayer', 'layer' => $this->remoteLayer, 'in_seq_no' => $this->generateSecretInSeqNo(), 'out_seq_no' => $this->generateSecretOutSeqNo(), 'message' => $message];
|
||||||
$seq = $this->out_seq_no++;
|
$seq = $this->out_seq_no++;
|
||||||
@ -378,7 +378,7 @@ final class SecretChatController implements Stringable
|
|||||||
}
|
}
|
||||||
$body['data'] = $this->key['fingerprint'].$message_key.Crypt::igeEncrypt($message, $aes_key, $aes_iv);
|
$body['data'] = $this->key['fingerprint'].$message_key.Crypt::igeEncrypt($message, $aes_key, $aes_iv);
|
||||||
$this->outgoing[$seq] = $body;
|
$this->outgoing[$seq] = $body;
|
||||||
$this->randomIdMap[$message['random_id']] = [$seq, true];
|
$this->randomIdMap[$randomId] = [$seq, true];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleDecryptedUpdate(array $update): void
|
private function handleDecryptedUpdate(array $update): void
|
||||||
@ -519,7 +519,7 @@ final class SecretChatController implements Stringable
|
|||||||
}
|
}
|
||||||
$message['message']['decrypted_message'] = $message['message']['decrypted_message']['message'];
|
$message['message']['decrypted_message'] = $message['message']['decrypted_message']['message'];
|
||||||
$this->incoming[$seq = $this->in_seq_no++] = $message;
|
$this->incoming[$seq = $this->in_seq_no++] = $message;
|
||||||
$this->randomIdMap[$message['random_id']] = [$seq, false];
|
$this->randomIdMap[$message['message']['decrypted_message']['random_id']] = [$seq, false];
|
||||||
$this->handleDecryptedUpdate($message);
|
$this->handleDecryptedUpdate($message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user