2020-07-09 18:35:37 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use danog\MadelineProto\Logger;
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
2020-08-12 22:14:50 +02:00
|
|
|
| Madeline Proto Sessions
|
2020-07-09 18:35:37 +02:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| To store information about an account session and avoid re-logging in, serialization must be done.
|
|
|
|
| A MadelineProto session is automatically serialized every
|
|
|
|
| settings['serialization']['serialization_interval'] seconds (by default 30 seconds),
|
|
|
|
| and on shutdown. If the scripts shutdowns normally (without ctrl+c or fatal errors/exceptions), the
|
|
|
|
| session will also be serialized automatically.
|
|
|
|
|
|
2020-08-12 22:14:50 +02:00
|
|
|
| Types: "single", "multiple"
|
|
|
|
|
|
2020-07-09 18:35:37 +02:00
|
|
|
*/
|
|
|
|
|
2020-08-12 22:14:50 +02:00
|
|
|
'sessions' => [
|
|
|
|
|
|
|
|
'single' => [
|
|
|
|
'session_file' => env('MP_SESSION_FILE', 'session.madeline'),
|
|
|
|
],
|
|
|
|
|
|
|
|
'multiple' => [
|
|
|
|
'table' => 'telegram_sessions'
|
|
|
|
],
|
|
|
|
|
|
|
|
],
|
2020-07-09 18:35:37 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Madeline Proto Settings
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| An array that contains some other arrays, which are the settings for
|
|
|
|
| a specific MadelineProto function.
|
|
|
|
|
|
|
|
|
| Please see documentations for more details.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
'settings' => [
|
|
|
|
|
|
|
|
'logger' => [
|
|
|
|
|
|
|
|
'logger' => Logger::FILE_LOGGER,
|
|
|
|
|
2020-08-16 18:18:49 +02:00
|
|
|
'logger_param' => env('MP_LOGGER_PATH', storage_path('logs/madeline_proto_' . date('dmY') . '.log')),
|
2020-07-09 18:35:37 +02:00
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
'app_info' => [
|
|
|
|
|
2020-08-12 22:14:50 +02:00
|
|
|
'api_id' => env('MP_TELEGRAM_API_ID'),
|
2020-07-09 18:35:37 +02:00
|
|
|
|
2020-08-12 22:14:50 +02:00
|
|
|
'api_hash' => env('MP_TELEGRAM_API_HASH'),
|
2020-07-09 18:35:37 +02:00
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|