mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 03:14:39 +01:00
Polyfill BC-breaking changes
This commit is contained in:
parent
923afaf651
commit
1b76f591b1
@ -397,6 +397,16 @@ final class Connection
|
||||
$arguments['queuePromise'] = new DeferredFuture;
|
||||
return $arguments['queuePromise'];
|
||||
}
|
||||
if (isset($arguments['reply_to_msg_id'])) {
|
||||
if (isset($arguments['reply_to'])) {
|
||||
throw new Exception("You can't provide a reply_to together with reply_to_msg_id and top_msg_id!");
|
||||
}
|
||||
$arguments['reply_to'] = [
|
||||
'_' => 'inputReplyToMessage',
|
||||
'reply_to_msg_id' => $arguments['reply_to_msg_id'],
|
||||
'top_msg_id' => $arguments['top_msg_id'] ?? null
|
||||
];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
|
@ -761,6 +761,10 @@ final class TL implements TLInterface
|
||||
$serialized .= "\0\0\0\0\0\0\0\0";
|
||||
continue;
|
||||
}
|
||||
if ($current_argument['type'] === 'double') {
|
||||
$serialized .= "\0\0\0\0\0\0\0\0";
|
||||
continue;
|
||||
}
|
||||
if ($tl['type'] === 'InputMedia' && $current_argument['name'] === 'mime_type') {
|
||||
$serialized .= ($this->serializeObject($current_argument, $arguments['file']['mime_type'], $current_argument['name'], $layer));
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user