mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 05:34:42 +01:00
fixes
This commit is contained in:
parent
8794309dfb
commit
fd27fd700b
@ -94,7 +94,7 @@ abstract class Media extends IpcCapable implements JsonSerializable
|
||||
$this->ttl = $rawMedia['ttl_seconds'] ?? null;
|
||||
$this->spoiler = $rawMedia['spoiler'] ?? false;
|
||||
$this->key = $rawMedia['key'] ?? null;
|
||||
$this->key = $rawMedia['iv'] ?? null;
|
||||
$this->iv = $rawMedia['iv'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -827,6 +827,8 @@ trait UpdateHandler
|
||||
$message['peer_id'] = $this->getInfo($to_id, API::INFO_TYPE_PEER);
|
||||
$this->populateMessageFlags($message);
|
||||
return [['_' => 'updateNewMessage', 'message' => $message, 'pts' => $updates['pts'], 'pts_count' => $updates['pts_count']]];
|
||||
case 'updateNewOutgoingEncryptedMessage':
|
||||
return [$updates];
|
||||
default:
|
||||
throw new ResponseException('Unrecognized update received: '.$updates['_']);
|
||||
}
|
||||
|
@ -399,6 +399,8 @@ final class SecretChatController implements Stringable
|
||||
$msg = $this->outgoing[$request['seq']];
|
||||
if (!isset($msg['message']['date'])) {
|
||||
$msg['message']['date'] = $response['date'];
|
||||
$msg['message']['decrypted_message'] = $msg['message']['message'];
|
||||
unset($msg['message']['message']);
|
||||
if (isset($response['file']) && $response['file']['_'] !== 'encryptedFileEmpty') {
|
||||
$msg['message']['file'] = $response['file'];
|
||||
$msg['message']['decrypted_message']['media']['file'] = $response['file'];
|
||||
|
Loading…
Reference in New Issue
Block a user