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