mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 07:34:41 +01:00
Fixes
This commit is contained in:
parent
19e518c9f9
commit
d2d8b370e1
@ -82,7 +82,7 @@ class PostgresArray extends SqlArray
|
||||
$host = $config->getHost();
|
||||
$port = $config->getPort();
|
||||
$this->pdo = new \PDO(
|
||||
"pgsql:host={$host};port={$port};charset=UTF8",
|
||||
"pgsql:host={$host};port={$port}",
|
||||
$settings->getUsername(),
|
||||
$settings->getPassword()
|
||||
);
|
||||
|
@ -721,7 +721,8 @@ class MTProto extends AsyncConstruct implements TLCallback
|
||||
// Report URI
|
||||
'reportDest',
|
||||
|
||||
'calls'
|
||||
'calls',
|
||||
'snitch',
|
||||
];
|
||||
if (!$this->updateHandler instanceof Closure) {
|
||||
$res[] = 'updateHandler';
|
||||
|
@ -224,7 +224,7 @@ class IncomingMessage extends Message
|
||||
*
|
||||
* @param T $return Return value
|
||||
*
|
||||
* @return ?Promise<T>
|
||||
* @psalm-return ?Promise<T>
|
||||
*/
|
||||
public function getSideEffects($return): ?Promise
|
||||
{
|
||||
|
@ -343,6 +343,7 @@ class Magic
|
||||
}
|
||||
if (self::$revision) {
|
||||
self::$revision = \trim(self::$revision);
|
||||
$latest = '';
|
||||
try {
|
||||
$version = (string) \min(80, (int) (PHP_MAJOR_VERSION.PHP_MINOR_VERSION));
|
||||
if ($version === "56") {
|
||||
@ -351,7 +352,7 @@ class Magic
|
||||
$latest = @\file_get_contents("https://phar.madelineproto.xyz/release$version");
|
||||
} catch (\Throwable $e) {
|
||||
}
|
||||
if ($latest ?? null) {
|
||||
if ($latest) {
|
||||
$latest = \trim(self::$revision) === \trim($latest) ? '' : ' (AN UPDATE IS REQUIRED)';
|
||||
}
|
||||
self::$revision = 'Revision: '.self::$revision.$latest;
|
||||
|
@ -26,6 +26,7 @@ use danog\MadelineProto\Ipc\IpcState;
|
||||
|
||||
use function Amp\File\exists;
|
||||
use function Amp\File\open;
|
||||
use function Amp\File\rename as renameAsync;
|
||||
use function Amp\File\stat;
|
||||
|
||||
/**
|
||||
@ -103,7 +104,7 @@ class SessionPaths
|
||||
yield $file->write(\serialize($object));
|
||||
yield $file->close();
|
||||
|
||||
yield \rename("$path.temp.php", $path);
|
||||
yield renameAsync("$path.temp.php", $path);
|
||||
} finally {
|
||||
$unlock();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user