Getdialogs bugfix

This commit is contained in:
Daniil Gentili 2019-09-13 18:32:43 +02:00
parent 310b489dfb
commit d968477125
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ function getUrl($constructor, $type)
{ {
$changed = str_replace('.', '_', $constructor); $changed = str_replace('.', '_', $constructor);
return "[$constructor](https://github.com/danog/MadelineProtoDocs/blob/geochats/docs/API_docs/$type/$changed.md)"; //return "[$constructor](https://github.com/danog/MadelineProtoDocs/blob/geochats/docs/API_docs/$type/$changed.md)";
return "[$constructor](https://docs.madelineproto.xyz/API_docs/$type/$changed.html)"; return "[$constructor](https://docs.madelineproto.xyz/API_docs/$type/$changed.html)";
} }
$old = getTL($argv[1]); $old = getTL($argv[1]);

View File

@ -57,7 +57,7 @@ trait DialogHandler
$last_peer = 0; $last_peer = 0;
$last_date = 0; $last_date = 0;
$last_id = 0; $last_id = 0;
$res['messages'] = \array_reverse($res['messages']); $res['messages'] = \array_reverse($res['messages'] ?? []);
foreach (\array_reverse($res['dialogs']) as $dialog) { foreach (\array_reverse($res['dialogs']) as $dialog) {
$id = $this->get_id($dialog['peer']); $id = $this->get_id($dialog['peer']);
if (!isset($dialogs[$id])) { if (!isset($dialogs[$id])) {