mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 21:14:43 +01:00
Possible fix
This commit is contained in:
parent
52e556f837
commit
fbfc2a9faa
@ -21,7 +21,6 @@
|
||||
use danog\MadelineProto\EventHandler;
|
||||
use danog\MadelineProto\Logger;
|
||||
use danog\MadelineProto\Settings;
|
||||
use danog\MadelineProto\Settings\Database\Mysql;
|
||||
|
||||
use function Amp\async;
|
||||
use function Amp\Future\await;
|
||||
@ -125,9 +124,4 @@ class SecretHandler extends EventHandler
|
||||
$settings = new Settings;
|
||||
$settings->getLogger()->setLevel(Logger::ULTRA_VERBOSE);
|
||||
|
||||
$settings->setDb(
|
||||
(new Mysql)
|
||||
->setUsername('root')
|
||||
);
|
||||
|
||||
SecretHandler::startAndLoop('secret.madeline', $settings);
|
||||
|
@ -7,7 +7,6 @@ namespace danog\MadelineProto;
|
||||
use Psr\Log\AbstractLogger;
|
||||
use Psr\Log\InvalidArgumentException;
|
||||
use Psr\Log\LogLevel;
|
||||
use Stringable;
|
||||
|
||||
/**
|
||||
* PSR-3 wrapper for MadelineProto's Logger.
|
||||
|
@ -87,12 +87,12 @@ final class SessionPaths
|
||||
{
|
||||
$session = Tools::absolute($session);
|
||||
$this->sessionDirectoryPath = $session;
|
||||
$this->sessionPath = "$session/safe.php";
|
||||
$this->lightStatePath = "$session/lightState.php";
|
||||
$this->lockPath = "$session/lock";
|
||||
$this->ipcPath = "$session/ipc";
|
||||
$this->ipcCallbackPath = "$session/callback.ipc";
|
||||
$this->ipcStatePath = "$session/ipcState.php";
|
||||
$this->sessionPath = $session.DIRECTORY_SEPARATOR."safe.php";
|
||||
$this->lightStatePath = $session.DIRECTORY_SEPARATOR."lightState.php";
|
||||
$this->lockPath = $session.DIRECTORY_SEPARATOR."lock";
|
||||
$this->ipcPath = $session.DIRECTORY_SEPARATOR."ipc";
|
||||
$this->ipcCallbackPath = $session.DIRECTORY_SEPARATOR."callback.ipc";
|
||||
$this->ipcStatePath = $session.DIRECTORY_SEPARATOR."ipcState.php";
|
||||
if (!exists($session)) {
|
||||
createDirectory($session);
|
||||
return;
|
||||
@ -102,10 +102,10 @@ final class SessionPaths
|
||||
createDirectory($session);
|
||||
foreach (['safe.php', 'lightState.php', 'lock', 'ipc', 'callback.ipc', 'ipcState.php'] as $part) {
|
||||
if (exists("$session.$part")) {
|
||||
move("$session.$part", "$session/$part");
|
||||
move("$session.$part", $session.DIRECTORY_SEPARATOR."$part");
|
||||
}
|
||||
if (exists("$session.$part.lock")) {
|
||||
move("$session.$part.lock", "$session/$part.lock");
|
||||
move("$session.$part.lock", $session.DIRECTORY_SEPARATOR."$part.lock");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user